Suppose I write
std::vector littleVector(1);
std::vector bigVector;
bigVector.reserve(100);
bigVector = littleVector;
Does t
This depends on the allocator traits.
Here's an excerpt from http://en.cppreference.com/w/cpp/container/vector/operator%3D:
If std::allocator_traits::propagate_on_container_copy_assignment() is true, the target allocator is replaced by a copy of the source allocator. If the target and the source allocators do not compare equal, the target (*this) allocator is used to deallocate the memory, then other's allocator is used to allocate it before copying the elements.(since C++11)
Basically, the memory is reallocated with the new allocator, if the allocators are incompatible (if they cannot deallocate each-other's memory.
It shouldn't matter between vector implementations, but between allocator implementations (which makes sense).