Hi, I have a proposal, wondering about your opinions.

Suppose one has a template function foo that accepts a variable number of parameters:

auto foo(T...)();

Suppose we actually want to have some type of order and type info instead:

auto foo(int, string)();

but we need a "variable" number of them such as

auto foo(int, string, int, string)();

auto foo(int, string, int, string, int, string)();

ad nausea.

We could simplify it all by allowing for a sort of pattern on the ... for variadics:

auto food((int,string)...)();


and, this, of course, expands to what was described earlier.


Now, this can be accomplished already with the single template method and foreach/static if testing the type, but that seems like it's excessively verbose.



Reply via email to