When the mutable
specifier is used in the declaration of a non-static data member, the data is mutable no matter whether the rest of the object is treated as const. With this fact, we may easily have the impression that mutable
specifier is the same kind of thing as the const
qualifier, which turns out to be not true. In fact, the language classifies mutable
specifier as a storage class specifier. This is quite counter-intuitive because mutable
does not specifies storage duration.
What are the rationales behind this design decision?
What would make it less logical than it would seemed if mutable
was a qualifier?
What are the advantages of making it a storage class specifier?