RAD Studio
ContentsIndex
PreviousUpNext
mutable

Category 

C++-Specific Keywords, Storage class specifiers 

Syntax  

mutable <variable name>;

Description 

Use the mutable specifier to make a variable modifiable even though it is in a const-qualified expression. 

Using the mutable Keyword 

Only class data members can be declared mutable. The mutable keyword cannot be used on static or const names. The purpose of mutable is to specify which data members can be modified by const member functions. Normally, a const member function cannot modify data members.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!