C++ Logo

std-proposals

Advanced search

Re: Allowing access to object representations

From: Language Lawyer <language.lawyer_at_[hidden]>
Date: Sat, 17 Aug 2019 22:33:17 +0300
You propose adding the following to [intro.object]:
> The object representation of an object a of type cv T is a sequence of N cv unsigned char objects, that occupy the same storage as a, where N is equal to sizeof(T)... The object representation of an object of nonzero size nested within an object `o` is guaranteed to appear in the object representation of `o`.

But where the object representation of a zero size base class subobject of `o` will appear?
You seem to guarantee that it, despite having zero size, still has sizeof(T) ≠ 0 elements.

And what do you mean by "APPEAR in the object representation of `o`"?
"Appear" means that the object representation of an object `a` nested within an object `b` shares *the same* `unsigned char` objects or there are two *different* sets of `unsigned char` objects in the region of storage occupied by both `a` and `b`?

Received on 2019-08-17 14:35:20