Pointer to C++ member possible?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sun Mar 9 13:46:13 PDT 2008
"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message
news:fr1hre$2ha9$1 at digitalmars.com...
> There's no standardized ABI for name mangling either, but calling a C++
> mangled name is what D's extern(C++) lets you do. From what I understand
> it just picks a particular ABI, e.g. DMD uses DMC's ABI. If/when GDC
> supports it, it will use the g++ ABI.
>
> So no standard ABI is not really a reason for not supporting it. Handling
> the non-standard ABI is supposed to be the job of extern(C++).
Good point.
> But seems like lack of a similar concept in D is a problem. The topic of
> C++-like pointer-to-member has come up before. I think there is some sort
> of hack to do a D version of it by setting the delegate's .ptr property?
> Casting to void* and setting it seems to work:
Works for pointers-to-member-functions (that is, if the given C++ ABI uses
the same ABI as a delegate), but what about pointers-to-member-data?
More information about the Digitalmars-d-learn
mailing list