#include #include using namespace std ; // 1. Base Case: Called when only one argument is left template T print_all(T last) { cout << last << endl; return last; } // 2. Recursive Case: Unpacks the first item and passes the rest forward template void print_all(First first, Rest... rest) { cout << first << ", "; // Recursive call with the remaining parameter pack print_all(rest...); } int main() { print_all( 1 , 2 ) ; return 0; }