Title
Size of base class subobject
Status
drafting
Section
6.7.2 [intro.object]
Submitter
GB

Created on 2017-02-27.00:00:00 last changed 95 months ago

Messages

Date: 2017-02-27.00:00:00
P0488R0 comment GB 9

According to 6.7.2 [intro.object] paragraph 7,

Unless it is a bit-field (11.4.10 [class.bit]), a most derived object shall have a nonzero size and shall occupy one or more bytes of storage. Base class subobjects may have zero size.

Base class objects of zero size is a misleading term, as sizeof such an object is non-zero. Size should not be a property of an object, rather of a type.

History
Date User Action Args
2017-02-27 00:00:00admincreate