9 ms·
When people talk of UB in C++ they always mean "implementation specific".
by otabdeveloper2 8y ago
When people talk of UB in C++ they always mean "implementation specific".
- saagarjha 8y agoNo, they don’t. These are separate concepts with different behavior. “Undefined behavior” is illegal to have in C/C++ programs and includes things like division by zero and out-of-bounds array access. “Implementation specific” behavior is legal but allowed to differ, such as querying the size of an int.
- esrauch 8y agoYou really don't need to go very far to get into UB instead of implementation defined: signed int overflow is already UB and the program is permitted to do literally anything if you ever accidentally make one of your ints too large.