http://d.puremagic.com/issues/show_bug.cgi?id=2725

           Summary: Pattern matching in static if not working with variadic
                    arguments
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: and...@metalanguage.com


struct A(B...) {}

void main()
{
    alias A!(int, float) X;
    static if (!is(X Y == A!(Z), Z))
    {
        static assert(false);
    }
}

This example fails the static assert. If one removes the float in the
instantiation of A the example compiles.

The compiler should match Z to the type tuple (int, float). Otherwise it is
impossible to detect whether a type is an instantiation of a variadic template.


-- 

Reply via email to