Features #
-
const_cast
allows us to remove or add theconst
orvolatile
property from a variable. -
const_cast
is perhaps the most rarely used cast operator because it is undefined behavior to removeconst
orvolatile
from a variable if the variable was declaredconst
orvolatile
in the first place.
Example #
Get hands-on with 1400+ tech skills courses.