3 ms·
> introduced the potential for undefined behavior Small quibble, C++ has the capability to be low level enough that the potential for UB is always there. Even
by Kamq 4y ago
> introduced the potential for undefined behavior
Small quibble, C++ has the capability to be low level enough that the potential for UB is always there. Even with a reference, you could be dealing with a completely random chunk of memory that someone told the compiler to interpret as the data type in question.
The quibble is the presentation of this as introducing the possibility of UB (the word introduced implies it wasn't already there), instead of used as a technique for minimizing the already present potential of UB.