3 ms·
I'm not sure if you meant to imply otherwise, but your last example won't (and shouldn't) compile with clang/gcc. clang++: error: cannot assign to variable '
by twr 10y ago
I'm not sure if you meant to imply otherwise, but your last example won't (and shouldn't) compile with clang/gcc.
clang++:
error: cannot assign to variable 'b' with const-qualified type 'const somestruct *const'
g++:
error: assignment of member ‘somestruct::moo’ in read-only object