all: this is quoted from Effective C++ 3rd editiion
const_cast is typically used to cast away the constness of objects. It is the only C++-style ca
const_cast
can only be used to cast to pointers and references. It can't be used to cast to objects. Here's why: if you have a const object you can't make it non-const and vice versa - it's already const, you can't redeclare it. You can only try to access it through a pointer or reference without (or with) const.