<<< Unrelated types conversion: reinterpret_cast | Index | Mistakes and pain caused by careless overriding of virtual and non-virtual functions >>> |
Use const_cast when you want to cast away constness on some object.
Advice: try using mutable class data members instead.
void foo( Account const& acct ) { Account& back_door = const_cast< Account& > acct; back_door.some_NONCONST_function(); }
<<< Unrelated types conversion: reinterpret_cast | Index | Mistakes and pain caused by careless overriding of virtual and non-virtual functions >>> |