2 ms·
The lack of memory safe casts drives me a bit batty. You would think casting something as signed or unsigned wouldn't promote to a int / unsigned int. Ditto fo
by Gibbon1 3y ago
The lack of memory safe casts drives me a bit batty.
You would think casting something as signed or unsigned wouldn't promote to a int / unsigned int. Ditto for const and unconst.
- WalterBright 3y agoWhen the first C++ Standard (C89) was being created, about half the compilers implemented "sign preserving" semantics, which is what you're advocating, and the other half implemented "value preserving" semantics. A great battle ensued, and many champions were slain. The value preserving folks carried the field, and the sign preserving folks changed their compilers.