Definitions

from Wiktionary, Creative Commons Attribution/Share-Alike License.

  • noun computing, programming The declaration of variables or objects as immutable.

Etymologies

from Wiktionary, Creative Commons Attribution/Share-Alike License

const (a keyword for constant in the C programming language and its derivatives) and -ness.

Support

Help support Wordnik (and make this page ad-free) by adopting the word constness.

Examples

  • Now, since the last time constness-matching blew up, I've learned that this is really a bug in Sun's compiler, because constness is not supposed to be mangled into the name.

    Planet KDE 2010

  • Now, since the last time constness-matching blew up, I've learned that this is really a bug in Sun's compiler, because constness is not supposed to be mangled into the name.

    Planet KDE 2010

  • Of course, no port is without its patches, so here they are: constness - this patch matches the constness of parameters in definitions with those in declarations, so that int foo (const int) is defined with int foo (const int i) and not as int foo (int i).

    Planet KDE 2010

  • Of course, no port is without its patches, so here they are: constness - this patch matches the constness of parameters in definitions with those in declarations, so that int foo (const int) is defined with int foo (const int i) and not as int foo (int i).

    Planet KDE 2010

  • The reason they all do that is because the C++ standard allows overloading of functions that differ only by the constness.

    KDE TechBase - Recent changes [en] 2009

  • Reason: compilers encode the constness of a function in the mangled name.

    KDE TechBase - Recent changes [en] 2009

Comments

Log in or sign up to get involved in the conversation. It's quick and easy.