#include #include using namespace std ; template void Log(T object) { std::cout << object << ' '; } template void Fold(Types... args) { // Unary right fold with the comma operator (Log(args), ...); // Expands to: Log(arg1), Log(arg2), Log(arg3), ... } int main() { Fold("Hello", "World", 123, 4.5); // Output: Hello World 123 4.5 return 0 ; }