POD implications for a struct which holds an standard library container
问题 I came across this question recently. My goal is to understand how the C++ compiler views struct definitions which hold standard library containers such as std::vector. Ben Voigt's answer to the linked question cites the following from the C++0x standard: .... A trivial class is a class that has a trivial default constructor (12.1) and is trivially copyable. [ Note: In particular, a trivially copyable or trivial class does not have virtual functions or virtual base classes. — end note ] A