[Issue 2599] Two variadic parameters should be accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 24 05:08:42 PST 2009


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


smjg at iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com




------- Comment #1 from smjg at iname.com  2009-01-24 07:08 -------
How would you use such a thing?

The trouble is that F!(int, char[], Object) in itself is ambiguous - does T1
bind to int and T2 to (char[], Object), or T1 to (int, char[]) and T2 to
Object?  Even one to the empty tuple and the the other to the whole thing? 
F!(int, char[], Object) would effectively have to be an internal, intermediate
template with the point of division as a parameter.

If you try to call the whole thing using IFTI, it's still ambiguous - what will
T1 bind to?

Maybe it could be made to work, if the compiler can be made to try to match
templates before expanding symbolic tuples under suitable conditions.


-- 



More information about the Digitalmars-d-bugs mailing list