On Monday, 24 May 2021 at 17:39:38 UTC, Gavin Ray wrote:
Hence why I was asking how to make D structs/classes that have compatible or identical vtables to multiply inherited objects to pass as arguments to `extern (C++)` functions.

I think classes annotated with extern is your only high level guaranteed == type safe option to be compatible to other c++ classes.

But you seek for the general multiple inheritance case which seems not to be supported with `extern`, sadly. So you stick with manual solutions like template metaprogramming or/and raw pointer fiddling. Anyway, both solutions would require an unsafe cast in the end, so you are on your own.



Reply via email to