On Tue, Aug 7, 2012 at 11:31 PM, Andrej Mitrovic <[email protected]> wrote: > On 8/7/12, Philippe Sigaud <[email protected]> wrote: >> You can also take the 'dual' of your solution and have a template that >> makes a function automatically expand tuples > > But that doesn't work for variadic templates, which is the OP's case: > > int foo(T...)(T t) { return 1; } > alias expander!foo efoo; // error
The template can easily be modified to deal with template functions, but in that case, you lose the parameter-type verification, for example if the function template has a constraint.
