小智 8
您不需要获取模板参数的数量.这样做:
template <typename... T>
void foo(int a, std::tuple<T...> TupleTest);
// make_tuple so we don't need to enter all the type names
foo(0, std::make_tuple(2, "TEST", 5.5));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4418 次 |
| 最近记录: |