Say you have a vector of vector:
vector<vector<string> > v;
when the internal array of the outer vector is resized (and suppose the internal array also have to be reallocated to a different address), for example by doing lots of v.push_back()
, does the internal array of the inner vectors get copied as well (because vector's copy constructor usually copies the internal array), or does C++ have a way to resize the outer vector without copying everything recursively?
Does C++11 move constructor affect this? Does this depend on the STL implementation?