Top "Const-cast" questions

Anything related to the `const_cast` operation in C++, i.e. a form of compile-time conversion where the `const` or `volatile` qualifiers are cast away (removed) from a variable.

Efficiently const_cast-ing a constant reference parameter

I have a member function which takes a constant reference parameter to another object. I want to const_cast this …

c++ parameters reference constants const-cast
Can not use dynamic_cast to a const object

I want to write a method where a Base object pointer will be passed as a parameter, and inside the …

c++ constants dynamic-cast const-cast
const_cast in template. Is there a unconst modifier?

I have a template class like this: template<T> class MyClass { T* data; } Sometimes, I want to use …

c++ templates constants const-cast