C++ : StandardLayoutType ( C++11)
cppreference.com
: . , . .
struct Q {};
struct S : Q { };
struct T : Q { };
struct U : S, T { }; // : Q
- ( , )
struct B { int i; }; //
struct C : B { }; //
struct D : C { }; //
struct E : D { char : 4; }; //
- ,
- (. cpp/language/ebo) , , , , , , , , . .
- , , , , , , , . .
- , , , , , , , . .
C++:
| CWG 1672 | C++11 | first non-static data member rule ignored existence of empty base classes |
first non-static data member rule made recursive |
| CWG 1813 | C++11 | , , |
|
| CWG 2120 | C++11 | |
(C++11) |
, ( ) |