Re: extern (C++) including bodies of member functions?

2016-07-16 Thread Jacob Carlborg via Digitalmars-d-learn
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

Re: extern (C++) including bodies of member functions?

2016-07-15 Thread cy via Digitalmars-d-learn
On Friday, 15 July 2016 at 19:20:52 UTC, Jacob Carlborg wrote: Yes. Just as it's possible to call C function from D, it's possible to implement functions in D that can be called from C. This compatibility applies C++ and Objective-C as well. So, it applies to member functions too (for C++)?

Re: extern (C++) including bodies of member functions?

2016-07-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-07-15 19:52, cy wrote: I would never (ever) do this myself, but trying to understand dmd, the code is absolutely packed with things like this: extern(C++) class Package : ScopeDSymbol { ... override const(char)* kind() const { return "package"; } ... override final

extern (C++) including bodies of member functions?

2016-07-15 Thread cy via Digitalmars-d-learn
I would never (ever) do this myself, but trying to understand dmd, the code is absolutely packed with things like this: extern(C++) class Package : ScopeDSymbol { ... override const(char)* kind() const { return "package"; } ... override final inout(Package) isPackage() inout {