non-public non-static members vs POD layout
scott douglass
scott.douglass at arm.com
Wed Apr 16 09:34:40 UTC 2008
Hi,
If a class or union has non-public non-static members it is non-POD
(because it's not an 'aggregate' in 8.5.1).
The C++ ABI (2.2) delegates layout of PODs to the base (C) ABI and
specifies layout of of POD types itself.
Does/should the C++ ABI guarantee than a class that is non-POD only
because of non-public non-static members has the same layout as the
corresponding POD class in cases where any tail-padding cannot be
reused? (Is base-class subobject the only case where tail-padding can
be reused?)
Also, a minor quibble: since TC1 PODs can contain pointer-to-members
and the base (C) ABI determines their layout, should it be mentioned
more explicitly in 2.2 how they are layed out (as is done for 'bool').
Thanks.
--
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the cxx-abi-dev
mailing list