Converting multiple inheritance code into C ++ for D language

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 17 15:31:41 PST 2017


On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote:
> so I changed the code to use interface but how would I do so I 
> could use the constructor in the same way as such a C ++ code?

Interfaces + mixin templates give you something very similar to 
multiple inheritance. You can have named functions in the mixin 
templates that do the work of the constructor, then call them 
from the real constructor.


More information about the Digitalmars-d-learn mailing list