1 module des.arch.util; 2 3 import std.meta; 4 5 /// 6 template staticFilter(alias F, T...) 7 { 8 static if (T.length == 0) 9 { 10 alias staticFilter = AliasSeq!(); 11 } 12 else static if (T.length == 1) 13 { 14 static if( F!(T[0]) ) 15 alias staticFilter = AliasSeq!(T[0]); 16 else alias staticFilter = AliasSeq!(); 17 } 18 else 19 { 20 alias staticFilter = AliasSeq!( staticFilter!(F, T[ 0 .. $/2]), 21 staticFilter!(F, T[$/2 .. $ ]) ); 22 } 23 } 24