On Monday, 9 November 2015 at 05:16:50 UTC, Daniel Murphy wrote:
On 9/11/2015 4:05 PM, Jeremy DeHaan wrote:
Because that's what this page says:
http://dlang.org/cpp_interface.html
That page is out of date. Virtual and non-virtual member
functions, static member functions, and free functions all work
since ~2.066.
The biggest missing thing is special member functions, ie
ctor/dtor/operators.
> Declaring it as a struct in D code is freaking genius. I
wonder if
> that works across the board with other compilers and OS's
though.
Mixing struct/class will only work properly with ABIs that
mangle them the same way, so it's not portable.
We should really update that page then.
What is the correct way to use C++ class instances in D? Can you
by chance give an example?