[Issue 756] New: IFTI for tuples only works if tuple parameter is last

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 27 13:06:13 PST 2006


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

           Summary: IFTI for tuples only works if tuple parameter is last
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: kamm at incasoftware.de


The spec does not seem to require that tuple parameters are the last parameter
in the list, but this doesn't work:

void foo(U...)(int t, U u) { }
void bar(U...)(U u, int t) { }

void main()
{
  foo(1, 2, 3);  // Ok, IFTI works
  bar(1, 2, 3);  // error: cannot deduce template function from argument types
(int,int,int)
  bar!(int, int)(1, 2, 3);  // Ok.
}


-- 



More information about the Digitalmars-d-bugs mailing list