[Issue 2599] Two variadic parameters should be accepted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 24 06:45:24 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2599
------- Comment #2 from andrei at metalanguage.com 2009-01-24 08:45 -------
(In reply to comment #1)
> 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.
>
When instantiated explicitly, all explicit arguments are eaten by T1. This is
the purpose of the pattern: pass some explicit arguments, then deduce some more
implicitly. Currently this is possible, but only with one ellipsis.
--
More information about the Digitalmars-d-bugs
mailing list