Is deleting an element in the middle of a std::vector still expensive with movable types?

Viewed 4698

It is generally thought of deleting an element in the middle of a std::vector to be costly, as it needs to copy every element after it down to fill the hole.

With C++11, std::vector will instead move all the elements down, which should be very fast (if only in relation to the copy), atleast I think so. It will still be linear in time, sure, but in general it should be faster than the old version.

Will this be true? Do I not have to worry about deleting some object in the middle anymore?

5 Answers
Related