#include<iostream>
#include <algorithm>
/* 终止循环操作 */
void printv()
{
std::cout << std::endl;
}
template<typename A, typename... B>
void printv(A a, B...b)
{
std::cout << a << ",";
printv(b...);
}
int main()
{
printv(7.5, "hello world", 9, 'c', 7.2);
return 0;
}
输出:
7.5,hello world,9,c,7.2,