Are non dereferenced iterators past the “one past-the-end” iterator of an array undefined behavior?
Yes, your program has undefined behaviour if you form such a pointer. That’s because the only way you can do so is to increment a valid pointer past the bounds of the object it points inside, and that is an undefined operation. [C++14: 5.7/5]: When an expression that has integral type is added to or … Read more