#includeusing namespace std; template void Println(T t, U... u) { if constexpr (sizeof...(U) == 0) { ::std::cout << t << ::std::endl; } else // 必须要有 else 不然会报错 { ::std::cout << t << ", "; Println(u...); } } int main(void) { Println(1, 3.14, "hello", '@'); return 0; }



