[solved] Is STL really improved with C++11 Move semantics?
I used to hear a lot that move semantic has major improvement on STL. Just build your legacy code after adding move semantics [in case you have some special member functions defined or else move semantics for your class is provided by compiler). This will give a performance improvement. Just thought to evaluate this. Refer code below: I have a class which allocates memory on heap and rule of 5 has been followed. Created a vector of this class and emplaced back an element (class object) When second emplace back is done, obviously capacity is same as size and re allocation will happen. I was expecting class move semantic rather than copy to avoid frequent heap allocations. Is my expectation not fulfilled my C++11 move semantic? Am I missing something? What to be done in existing code so that vector does use move semantic for class object when size is capacity and doing reallocation of elements?