extern (C++) including bodies of member functions?
Jacob Carlborg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jul 16 10:15:58 PDT 2016
On 2016-07-16 04:01, cy wrote:
> So, it applies to member functions too (for C++)? Just as if you passed
> an extern(C++) directive to each one? And only their signature/mangling
> is changed, so that say in gdb for instance, they represent Type::member
> instead of zzTypezdxqdstuffmember?
Yes. It's a bit more than the mangling that changes. The layout of the
class/struct needs to be correct and the this pointer needs to be passed
correctly.
> Oh, I thought it happened a while ago, like when D2 came out. (Or was D2
> recent as well?)
No, D2 was started in something like 2007. The compiler was converted
last year in August.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list