Is the size of a struct required to be an exact multiple of the alignment of that struct?

5.3.3/2

When applied to a class, the result [of sizeof] is the number of bytes in an object of that class, including any padding required for placing objects of that type in an array.

So yes, object size is a multiple of its alignment.

Leave a Comment