3 class alignas(4) EmptyClassAligned
{};
4 class ClassEmptyMember
{
11 class SingleMemberClass
{
15 struct PaddingMember
{
19 class PaddingMemberClass
{
24 const unsigned sizeof_empty
= sizeof(Empty
);
25 const unsigned sizeof_empty_class
= sizeof(EmptyClass
);
26 const unsigned sizeof_empty_class_aligned
= sizeof(EmptyClassAligned
);
27 const unsigned sizeof_class_empty_member
= sizeof(ClassEmptyMember
);
28 const unsigned sizeof_single
= sizeof(SingleMember
);
29 const unsigned sizeof_single_class
= sizeof(SingleMemberClass
);
30 const unsigned sizeof_padding
= sizeof(PaddingMember
);
31 const unsigned sizeof_padding_class
= sizeof(PaddingMemberClass
);
35 EmptyClass empty_class
;
36 EmptyClassAligned empty_class_aligned
;
37 ClassEmptyMember class_empty_member
;
39 SingleMemberClass single_class
;
40 PaddingMember padding
;
41 PaddingMemberClass padding_class
;
42 // Make sure globals are used.
43 return sizeof_empty
+ sizeof_empty_class
+ sizeof_class_empty_member
+
44 sizeof_single
+ +sizeof_empty_class_aligned
+ sizeof_single_class
+
45 sizeof_padding
+ sizeof_padding_class
;