It does in C++03. I am not sure about C++0x as that will
have move semantics. As of now, reallocating a vector
involves assignment or copy- construction, either of which
necessitate an lvalue-rvalue conversion (maybe a move will
do that too). Although the language in [4.1/1] leaves out
singular values, it seems pretty clear that the intent is to
make it UB to invoke an lvalue-rvalue conversion on an
invalid pointer. Under the hoods, that happens when a vector
of pointers reallocates and an invalid pointer is involved.
There is some discussion / disagreement / open question as
to whether _purely and absolutely formally_ even the mere
existence of singular values in a pointer triggers undefined
behavior. A common sense reaction is, however, to not bother
unless actual operations on the vector are performed that
may reasonably invoke UB. This suffices to stay clear of UB
on all implementations known to man (or at least in this
forum, nobody ever pointed out a less sane implementation).
I'm not sure I'm catching the point (I've read that
assertion before, but I still haven't wrapped my mind
around this, I'd like to make it clear once for all).
Besides, the advice of zeroing the pointer is good, but the
best would be to simply drop the vector or to clear it out,
since all the pointers it contains are dangling or null, by
now.
I felt the urge to point out possible pitfalls since we do
not know what happens to the vector afterwards. I agree that
the cleanest would be, to clear out the vector or to have it
destroyed.