On 19.08.2016 20:25, Engine Machine wrote:
So we can create types relationships easier:class Type(T) : Type!null { int x; static if (T is Dog) int y;
alias Seq(T...)=T; template TypeParent(T...) if(T.length==1){ static if(is(typeof(T[0])==typeof(null))) alias TypeParent = Seq!(); else alias TypeParent = Seq!(Type!null); } class Type(T...): TypeParent!T if(T.length==1){ int x; static if (T is Dog) int y; }