I\'m currently trying to get my head around some of the things I can do with variadic template support. Let\'s say I have a function like this -
template <
A variation of the top answer which will reject implicit conversion to int , if that is your preference:
int
#include void foo(int); template void foo(Arg1 first, Args... more) { static_assert(std::is_same_v, "foo called with non-int argument"); foo(first); foo(more...); }