Re: Mixin templates as virtual function add tool

2016-04-08 Thread ag0aep6g via Digitalmars-d-learn
On 08.04.2016 14:04, Voitech wrote: template MixinTypeIterate(alias mixinTemplate,TList...){ [...] } how to alias mixin template to be able to pass it to this one ? class BaseClass(T){ protected alias Types=AliasSeq!(int,string,ubyte); private alias WrappedMix(S)=mixin Mix!(T,S);

Mixin templates as virtual function add tool

2016-04-08 Thread Voitech via Digitalmars-d-learn
Hi, I'm unfortunately in D this construction is not possible to define: class A(T){ abstract void method(S)(T arg1,S arg2); } As adding S to function declaration makes it not virtual. But we can add this kind of functionality using mixin templates mixin template BaseMix(T,S){ abstract