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

Rule:  INT#006Checked automatically with code checker

Synopsis:A member function that should not change the state of the object shall be declared const
Language:C++
Severity Level:2
Category:Class Interface


Description:

It is possible that a const method requires non-const access to some of the data members, without changing the objects state. For example, when a lock variable (i.e. critical section) is used to synchronize access to other data members. In this case, the lock variable should be made mutable. See also [CON#005].



Literature References:
Ellemtel Rule 23
ISC++ Rule 7.11