[Issue 12636] extern(C++) class that implements D interface segfaults
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jul 28 07:14:17 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12636
--- Comment #4 from yebblies <yebblies at gmail.com> ---
(In reply to Steven Schveighoffer from comment #3)
> A class that implements a COM interface, has default linkage other than
> extern(D). I thought it was similar to how extern(C++) works.
extern(C++) interfaces work the same as COM interfaces except for linkage.
Classes on the other hand...
>
> I don't know what the internal difference is between extern(C++) classes and
> D classes, but I can understand if we cannot implement both ABIs in the same
> class. I have to trust you on that one :)
Yeah, either the first vtable entry is the classinfo pointer or not, there
isn't much middle ground there.
> TBH, I'm not really interested in
> making this work, it was a test I ran to see if it did after telling someone
> on d.learn that you can't create C++ classes in D, and you corrected me.
>
> Feel free to overtake this bug as an "Accepts invalid".
At the very least it's a diagnostic issue. Should be easy enough to detect.
--
More information about the Digitalmars-d-bugs
mailing list