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

           Summary: Static if matching using alias parameter in template
                    fails
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Simen Kjaeraas <[email protected]> 2012-05-14 03:45:33 
PDT ---
template getParameters( T, alias P ) {
    static if ( is( T t == P!U, U... ) ) {
        alias U getParameters;
    } else {
        static assert( false );
    }
}

void main( ) {
    alias getParameters!( Tuple!(int, string), Tuple ) args;
}

This asserts. Replace T t == P!U, U... with T t == Tuple!U, U..., and it works.
(but of course then the intended functionality does not work)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to