2 ms·
> In both cases its wrong to mutate the object in the const member, Its just in C++98 no one _explicitly_ told you that. How so? You cannot mutate a data memb
by eatitraw 13y ago
> In both cases its wrong to mutate the object in the const member, Its just in C++98 no one _explicitly_ told you that.
How so? You cannot mutate a data member(without placing mutable before it) in const member function. It is a compiler error. Pretty explicit IMO.
The point of the article is that you should ensure thread-safety when you mutate mutable(sounds funny, I know) members in const methods.