Taking the example from here: trivial vs. standard layout vs. POD
The following code passes:
struct T {
public:
int i;
private:
int j;
};
static_assert(! std::is_standard_layout<T>::value, "");
Yet the following does not:
static_assert(! std::is_standard_layout<std::string>::value, "");
So if all it takes for a type not to be a standard layout, then how could std::string possible be one?