Constness

noun

noun ·Rare ·Advanced level

Definitions

Noun
  1. 1
    The declaration of variables or objects as immutable. uncountable

    "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."

Example

More examples

"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."

Etymology

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

Related phrases

Data sourced from Wiktionary, WordNet, CMU, and other open linguistic databases. Updated March 2026.