Summary: [PATCH] CommonType fails for singular alias value
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Simen Kjaeraas <> 2010-06-07 16:35:07 
PDT ---
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;
            alias T[0] commonOrSingleType;
    else static if (is(typeof(true ? T[0].init : T[1].init) U))
        alias CommonType!(U, T[2 .. $]) CommonType;
        alias void CommonType;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to