lysdexic@programming.devM to C++@programming.devEnglish · 1 year agoC++ Should Be C++www.open-std.orgexternal-linkmessage-square6fedilinkarrow-up11arrow-down10cross-posted to: cpp
arrow-up11arrow-down1external-linkC++ Should Be C++www.open-std.orglysdexic@programming.devM to C++@programming.devEnglish · 1 year agomessage-square6fedilinkcross-posted to: cpp
minus-squaremrkite@programming.devlinkfedilinkarrow-up2·1 year agoIt violates the principle of least surprise. You don’t expect the compiler to delete your bounds checking etc. The way c and c++ define and use UB is like finding an error at compile time and instead of reporting it, the compiler decides to exploit it.
It violates the principle of least surprise. You don’t expect the compiler to delete your bounds checking etc.
The way c and c++ define and use UB is like finding an error at compile time and instead of reporting it, the compiler decides to exploit it.