Problem with calling a variadic function template when passing brace initialiser list arguments
Consider this function template: template <class... T> void foo (std::tuple<T, char, double> ... x); This invocation works: using K = std::tuple<int, char, double>; foo ( K{1,'2',3.0}, K{4,'5',6.0}, K{7,'8',9.0} ); This one doesn't: foo ( {1,'2',3.0}, {4,'5',6.0}, {7,'8',9.0} ); (gcc and clang both complain about too many arguments for foo ) Why is the second call a problem? Can I rewrite the declaration of foo so that the second call is also accepted? Thee template parameter T is only used to implement variadicity. The actual type is known and fixed, only the number of arguments varies. In