[Issue 4311] New: Applying a template to a variadic template parameter in a templated function's parameter list breaks compilation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 14 06:39:52 PDT 2010


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

           Summary: Applying a template to a variadic template parameter
                    in a templated function's parameter list breaks
                    compilation
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: simen.kjaras at gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2010-06-14 06:39:51 PDT ---
Test case:

template foo( T... ) {
    alias T[0] foo; // Does not matter what is in here
}

auto bar( T... )( foo!T arg ) {
}

bar!( int, float )( 2 );



Error: template bar(T...) does not match any function template declaration
Error: template bar(T...) cannot deduce template function from argument types
!(1,2)()
Error: template instance errors instantiating template

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


More information about the Digitalmars-d-bugs mailing list