Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cxx-abi-dev] non-public non-static members vs POD layout


  • To: cxx-abi-dev@xxxxxxxxxxxxxxxx
  • Subject: Re: [cxx-abi-dev] non-public non-static members vs POD layout
  • From: David Vandevoorde <daveed@xxxxxxx>
  • Date: Tue, 29 Apr 2008 13:51:29 -0400


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