03-31-2015, 08:39 PM
std::String is allowed to, std::vector can't do the optimization due to the requirement of std::swap on two vectors not preforming any changes to the members of the vector, including moving them. See http://stackoverflow.com/questions/81909...timization