hello,
Therefore, let me restrict here below the third part I consider more interesting:
A way to allow parameter packs not to be the last for a main template, based on 'auto' used as explicit templateĀ argument
declaration:
template<typename... T, typename... U>
void f(T... t, U... u);
invocation:
f<auto...[2]>(1, 'b', 2.);
forced to deduce only two parameter types for the first parameter pack.
An extended use may be:
declaration:
template<typename V, typename W>
void g(V v, W w);
invocation:
g<auto, char>(1, 'b');
which will force second parameter as char, while leaving first parameter to be deduced.
It is a kind of 'default deduction'.
Then auto[N] may be a syntax sugar in place of repeating "auto," N times in case the (N+1)-th parameter has to be explicit.
In case, "auto..." would be a redundant option to use for the last parameter pack.
Not sure where "auto" (instead of "auto...") should work also for (the last) parameter pack.
Is this 'defaulted' behaviour considered evil as default parameter values for functions ?
--