|
|
Const member functions - const and mutable |
A member function may be logically constant, but the underlying state of the object may be physically non-constant (mutable) It is possible to mark a data members as mutable Mutable members can always be updated, even if they belong to a const object |
|
The problem is that const member functions are not allowed to modify the caching variables. In the next version - on the following page - we show how to deal with this problem |