Comment by blackflame7000
7 years ago
That's because it is undefined behavior to cast a const object to a non-const object. Instead, you must tell the compiler via the mutable keyword or else it will make optimizations based on the assumption it can't change.
No comments yet
Contribute on Hacker News ↗