With a few exceptions (for example, smart pointers), displaced objects remain in a valid but undefined state.
In std::string , which uses small string optimization, for example, if the string is small, there is no dynamic allocation, and moving is a copy. In this case, it is absolutely fair for the implementation to leave the original row intact and not bear the additional cost of emptying the row.
source share