TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C++ Coding Standard

Rule:  INT#025

This rule is Obsolete
Synopsis:Do not let const member functions change the state of the program
Severity Level:1
Category:Class Interface


Note that const member functions are allowed to change e.g. mutable members (see also [CON#005]). Similarly, member functions might modify an internal cache in order to achieve significant performance improvements. Such an optimization could be completely shielded from the rest of the program, and it must be allowed to call such a function for const objects. Hence it must be allowed to be declared as a const function.

See also [INT#006].

Literature References:
ISC++ Rec. 7.13