C++ Interop -- Two Questions

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 9 07:37:36 PDT 2015


On Wednesday, 9 September 2015 at 13:17:53 UTC, Mike Parker wrote:
> Yes, I get that. But how does that work when you're linking to 
> a C++ library and the translation of the C++ class to D is an 
> interface? Or is it possible now to link D classes directly 
> with C classes?

Classes and templates except for special members (which are 
usually relied upon heavily in C++ code, but maybe your C++ code 
is unusual).

> I realize I can do it myself when I sit down this weekend and 
> start exploring it, but I'm hoping someone can point me to a 
> blog post, some sample code, or just give me some insights to 
> save time.

You can see bugzilla issues marked with C++ keyword. The docs 
were deemed unworthy because of skills required to write C++ 
bindings. Maybe because it's still not practical as it doesn't 
support critical C++ idioms like RAII.


More information about the Digitalmars-d-learn mailing list