Definitions
from Wiktionary, Creative Commons Attribution/Share-Alike License.
- noun computing, programming The
declaration ofvariables orobjects asimmutable .
Etymologies
from Wiktionary, Creative Commons Attribution/Share-Alike License
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.
-
Reason: compilers encode the constness of a function in the mangled name.
Comments
Log in or sign up to get involved in the conversation. It's quick and easy.