[cxx-abi-dev] non-public non-static members vs POD layout
David Vandevoorde
daveed at edg.com
Tue Apr 29 17:51:29 UTC 2008
On Apr 29, 2008, at 11:28 AM, Mark Mitchell wrote:
[...]
>
> So, yes, we agreed to use TC1 PODs, and thus pointers-to-members are
> in. In that case, yes, I think we have to say how they are laid out
> -- but I think we already do.
>
> For data members, we say that a pointer to data member is
> "represented as a ptrdiff_t."
>
> And for pointers to function members; we say that they have "the
> size, data size, and alignment of a class containing these two
> members", after saying what members they are. I think we could
> probably make that more explicit by saying that they layout is as
> for the following class:
>
> struct pointer_to_member {
> void (*ptr)();
> ptrdiff_t adj;
> };
>
> That would eliminate ambiguities. But, I think that's just an
> editorial change. (Anyone object to that change? Or think it's a
> good idea?)
No objection. (I agree it's editorial, and I think clarification is a
good idea.)
Daveed
More information about the cxx-abi-dev
mailing list