If we have a map <int, vector<int> > are vectors moved when the red-black tree of map changes or it stores pointers to vectors or something like that and does not move them(else working with maps won’t be O(lg n) anymore e.g. if we push_back elements to some vectors)
If we have a map <int, vector<int> > are vector s moved when the
Share
See this one:
std::map, pointer to map key value, is this possible?
the second top answer:
So, if the references are preserved, the data cannot be copied into a different part of memory. And if that is the case, I don’t see the point in performing any copy at all…