C++ interop, abstract struct problem
Paul Backus
snarwin at gmail.com
Mon Dec 28 16:42:19 UTC 2020
On Monday, 28 December 2020 at 15:42:26 UTC, RSY wrote:
> ``IAllocator`` is an abstract struct, (a struct with virtual
> functions)
>
> But the problem is D doesn't allow that, so apparently i need
> to use an abstract class and wrap it using: ``extern (C++,
> struct)``
You could try using one of the techniques on this page to make
`IAllocator` a struct instead of a class:
https://dlang.org/spec/cpp_interface.html#structs
More information about the Digitalmars-d-learn
mailing list