On Sunday, 23 May 2021 at 21:08:06 UTC, Ola Fosheim Grostad wrote:
On Sunday, 23 May 2021 at 21:02:31 UTC, Gavin Ray wrote:
I don't really know anything at all about compilers or
low-level code -- but is there any high-level notion of
"inheritance" after it's been compiled?
Yes, in the structure of the vtable, which is why the spec is
so hard to read.
If possible stick to single inheritance in C++...
Yeah agreed, multiple inheritance is asking for trouble.
But unfortunately when you're binding to existing libraries you
don't have control over the API
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.
Also general explanation of what makes a compiled variable
compatible in terms of vtable with what's expected as an argument
I'd be grateful for solid information on this