2 ms·
This is bad, but it is really no different than: int * b = new int; *++b; Dereferencing past the end is always UB in C and C++ and it is hard to fix a
by gpderetta 4y ago
This is bad, but it is really no different than:
int * b = new int;
*++b;
Dereferencing past the end is always UB in C and C++ and it is hard to fix at the language level when using raw pointers.