Is the “one-past-the-end” pointer of a non-array type a valid concept in C++?

No, it is legal. 5.7(4) – one paragraph before your quote – says: “For the purposes of these operators, a pointer to a nonarray object behaves the same as a pointer to the
first element of an array of length one with the type of the object as its element type.”

Leave a Comment