constness

noun

constness

noun

Etymology From const (“a keyword for constant in the C programming language and its derivatives”) + -ness.

1

Computing, Engineering, Mathematics, Natural sciences, Physical sciences, Programming, Sciences The declaration of variables or objects as immutable.

  • If you want to change a class member inside a const member function, the traditional approach is to cast away constness by saying (X*)this.1995, Embedded Systems Programming, volume 8, page 180:
Related terms
const correctness

Entry derived from the Wiktionary, under licence CC BY-SA 4.0 — list of authors.