3 ms·
> The fact that you can const_cast away No, you cant. The standard states that "any attempt to modify a const object during its lifetime results in undefined
by geezerjay 9y ago
> The fact that you can const_cast away
No, you cant. The standard states that "any attempt to modify a const object during its lifetime results in undefined behavior".
If you're intentionally writing code that relies on undefined behavior, you are intentionally writing broken code.