std.traits.CommonType does not correctly handle the situation of one single value (non-type) parameter, i.e. CommonType!3. Solution here: template CommonType(T...) { static if (!T.length) alias void CommonType; else static if (T.length == 1) { static if (is(typeof(T[0]))) alias typeof( T[0] ) commonOrSingleType; else alias T[0] commonOrSingleType; } else static if (is(typeof(true ? T[0].init : T[1].init) U)) alias CommonType!(U, T[2 .. $]) CommonType; else alias void CommonType; }
Fixed SVN.