//#include
//#include
//#include
//#include
//#include <type_traits>
//#include
void printer()
{
}
template
void printer(T a) {
std::cout << a << std::endl;
}
//c++11
template<class …Args>
void printer(Args&&… args) {
using expander = int[];
expander{ (printer(args),0)… };//逗号表达式
}
template
void printer(T a) {
std::cout << a << std::endl;
}
template<class …Args>
void printer(Args&&… args) {
(printer(args), …);//折叠表达式
}
int main()
{
printer(1, 2, 3, “abc”);
}