我所經歷的大文章上C++ POD, Trivial and Standard Layout classes 一個特性我還沒有清楚地理解有關標準佈局如下: -標準佈局的C++
A standard layout has no base classes of the same type as the first
non-static data member
所以下面將不會是一個標準的佈局,因爲它有第一構件相同的基類
struct NonStandardLayout3 : StandardLayout1 {
StandardLayout1 x; // first member cannot be of the same type as base
};
但性能代價和屬性明智如何在上述結構的任何比
不同這是上面這個的修正。
相關[post](http://stackoverflow.com/q/7160901/183120)。 – legends2k