[Issue 18845] Extern(C++) class with no virtual functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 9 21:53:56 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18845

--- Comment #2 from Manu <turkeyman at gmail.com> ---
What does "safe casting" mean?
You mean that it might require pointer adjustment?

I mean, it's absolutely necessary that when casting extern(C++) classes, that
some special logic is applied which may need to perform a pointer adjustment,
just like when casting C++ classes in C++ ;)
We can't escape that. We either need to support it, or it's just broken.

At very least, we should emit an error when an extern(C++) class is declared
with no virtual members saying it's not supported.

--


More information about the Digitalmars-d-bugs mailing list