Propagate constness to data pointed by member variables
It is often quite confusing to C++ newcomers that const member functions are allowed to call non-const methods on objects referenced by the class (either by pointer or reference). For example, the following is perfectly correct: class SomeClass { class SomeClassImpl; SomeClassImpl * impl_; // PImpl idiom public: void const_method() const; }; struct SomeClass::SomeClassImpl { void non_const_method() { /*modify data*/ } }; void SomeClass::const_method() const { impl_->non_const_method(); //ok because impl_ is const, not *impl_ }; However, it would sometimes be rather handy if the constness would