When you're making the object 'const', you're not making the assumption that no one who derives from this class need mutable state. What you're doing is asserting that bits belonging to this object needs to be 'const' to preserve sequential consistency across threads or for other reasons.

Bits belonging to *this* object? I thought const was transitive...

If the derived class casts away const, it breaks that contract.

So you're saying the same thing: Derived classes CANNOT have mutable state...

Reply via email to