Why does std::vector require move-constructors for its elements?
问题 C++98 stated that std::vector elements should have copy-constructors. In C++11 that's no longer the case. Instead, the elements must have move-constructors. Depending on what you do with std::vector, you may or may not really need to call the copy- or move-constructor, yet only one of them is always formally required by the standard. Why? Update: Apparently, the premise is incorrect. My confusion stemmed from reading answers such as this. 回答1: As implied in the comments, there isn't simply