[cxx-abi-dev] Empty Classes and data layout

Jason Merrill jason at redhat.com
Fri May 10 12:29:42 UTC 2013


On 05/10/2013 04:43 AM, Richard Earnshaw wrote:
> But that's my point, an Empty class doesn't have it's size equal to it's
> data size, since the latter is zero, and the former must be non-zero.

John's point is that for a POD for the purpose of layout, "data size" is 
*defined* by the ABI to include the tail padding.  So for the purpose of 
layout, the "data size" of an empty class is 1 even though there's no 
actual data.

Jason



More information about the cxx-abi-dev mailing list