Article: Alternatives to C++
tsbockman
thomas.bockman at gmail.com
Tue Mar 9 00:02:00 UTC 2021
On Monday, 8 March 2021 at 21:00:47 UTC, Ali Çehreli wrote:
> So, I hereby help populatize something I learned recently:
> extern(C++) class definitions don't have that monitor pointer:
>
> // Smaller object:
> extern (C++) class C {
> // ...
> }
So, it turns out that I actually found TWO critical,
show-stopping bugs in extern(C++) class support today (thanks
@kinke):
"Unable to dynamic cast extern(C++) classes":
https://issues.dlang.org/show_bug.cgi?id=21690
"extern(C++) class instance dtors are never called, breaking
RAII":
https://issues.dlang.org/show_bug.cgi?id=21693
I believe extern(C++) classes need more testing before they
should be recommended solely as a means to save one pointer's
worth of memory...
I need them to work for other reasons, though, so I hope these
get fixed.
More information about the Digitalmars-d
mailing list