我有一个模板功能
template <class T>
void foo() {
// Within this function I need to create a new T
// with some parameters. Now the problem is I don't
// know the number of parameters needed for T (could be
// 2 or 3 or 4)
auto p = new T(...);
}
我该如何解决这个问题?不知何故,我记得看到了带有(...,...)之类的输入的函数?