vector<X> v;
X x;
v.push_back(x); v.push_back(x); v.push_back(x);
Why this code calls the copy constructor of a class X
6 times? (using g++ 4.7.2 STL)
Please, I'd like to know it precisely what happens under hood with this particular STL.
See Question&Answers more detail:os