True to form, there's multiple forms of const in C++.
const on a methond says "I won't mutate the state of this class (except for members explicitly marked as mutable)
A const reference says I won't mutate this (unless I const_cast away the constness first)
But a const variable actually is a promise to C++, saying "This object will never mutate after initialization ever forever I promise for real this time " (except in the destructor, then it's OK).
Confusingly, all together this means you're only allowed to cast away constness if the object wasn't const to start with.
___
Some of the above may be wrong, not a language expert.