A most derived object shall have a non-zero size and shall occupy one or more bytes of storage. Base class subobjects may have zero size.
Sunday, November 29, 2009
Episode Twelve: When the Size *does* Matter
In C++, zero-sized addressable objects are forbidden. Objects must have size, even if they are empty. This is required in order to have different addresses for different objects. From the standard, 1.8.5:
Subscribe to:
Posts (Atom)