// Copyright (C) 2022 johannst #include // Base case with one parameter. template void show_int() { printf("%d\n", P); } // General case with at least two parameters, to disambiguate from base case. template void show_int() { printf("%d, ", P0); show_int(); } // Base case with one parameter. template void show(const T& t) { std::cout << t << '\n'; } // General case with at least two parameters, to disambiguate from base case. template void show(const T0& t0, const T1& t1, const Types&... types) { std::cout << t0 << ", "; show(t1, types...); } int main() { show_int<1, 2, 3, 4, 5>(); show(1, 1.0, "foo", 'a'); }