There's no provision in the standard library allocator interface for resizing an existing block of memory. There's just "allocate a block of size N" and "deallocate a block" semantics.
So, the answer to your question is "No, you can't do this with std::vector
"
You can, of course, write your own vector-like class that does this - and if this is something that is important to you, you should do so. Writing a container class is not really that hard.