Can we just have struct inheritence already?

Walter Bright newshound2 at digitalmars.com
Wed Jun 19 00:43:58 UTC 2019


On 6/18/2019 5:01 PM, Timon Gehr wrote:
> This works if Base and Derived are defined in the same module. Otherwise this 
> does not do the correct thing, because mixin templates are analyzed in the scope 
> into which they are mixed.

That is correct, but with some care you can make it work, even if the mixin 
template functions just forward to other functions which are evaluated in the 
BaseMembers' scope.



More information about the Digitalmars-d mailing list