2 ms·
> The function is allowed to cast away const and modify the object. Correct, but only if the original (referenced) object is not const itself. Casting away co
by MauranKilom 7y ago
> The function is allowed to cast away const and modify the object.
Correct, but only if the original (referenced) object is not const itself. Casting away constness to modify an object that was declared const is 100% UB.