Question is simple, how would I implement a function taking a variable number of arguments (alike the variadic template), however where all arguments have the same type, say
@Skeen How about this?
template void func_1(std::initializer_list&& a) { // do something } template void func(T&&... a) { func_1({std::forward(a)...}); } int main() { func(1, 2, 3); // func(1, 2, 3, 4.0); // OK doesn't compile }