Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The C++ Standard, [dcl.type.cv], paragraph 4 [ISO/IEC 14882-2014], states:

Except that any class member declared mutable can be modified, any attempt to modify a const object during its lifetime results in undefined behavior.

...

Bibliography

[ISO/IEC 14882-2014]Subclause 7.1.6.1, "The cv-qualifiers"
[Sutter 04]Item 94, "Avoid Casting Away const"

...