Summary: Pattern matching in static if not working with variadic
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

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