I have a vector std::vector<std::vector<ContactPairs>> m_contactPairs;
If I call m_contactPairs.push_back()
or any other function that will resize the outermost vector, will the elements inside that vector have to reallocate (the inner elements in this case being std::vector<ContactPairs>
), or will the inner vectors just do a shallow copy and keep pointing at the same memory they already own?
I'm using Visual Studio 2010, which is prior C++11, but has some of the functionality as extensions