My question is exactly analog to this one:
Is the compiler allowed to recycle freed pointer variables?
but in the case of C++.
In the case of C, ISO/IEC 9899:1999 §6.2.4, paragraph 2 says:
The lifetime of an object is the portion of program execution during which storage is guaranteed to be reserved for it. An object exists, has a constant address, and retains its last-stored value throughout its lifetime. If an object is referred to outside of its lifetime, the behavior is undefined. The value of a pointer becomes indeterminate when the object it points to reaches the end of its lifetime
However, looking at the latest C++ standard, I could not find any definitive answer to that question.
My understanding at the moment is that in C++, while the memory location pointed to by a pointer that has been deleted is indeed invalid, the value of the pointer itself is not allowed to change, unless the programmer instructs the program to do so.
Could anybody point me to some reference material that could bring a definite answer to this question?