" ". , (. 1.8):
[A] . .
[...] , , . [...] , ; .
( 9):
. : .
, "" : :
struct A {}; struct B : A { int x; };
struct X { int a; }; struct Y : X {};
B b; Y y;. , b, A - b (.. &static_cast<A&>(b)), b.x , , y, X - y, y.a - .
, , :
struct S {}; struct T { S s; };
"equivalent" , .
:
struct Foo { int x; char a; };
struct Bar : Foo { short q; };
sizeof(int) == 4 sizeof(short) == 2. sizeof(Foo) == 8, sizeof(Bar) 8, .
9.2/13:
(non-union) ( 11) , . (11). , ; (10.3) (10.1).
, 9.2/10 , , " ". , , , " ", b y .