テンプレート機能がある
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(...);
}
これを解決するにはどうすればよいですか?どういうわけか、(...、...) のような入力を持つ関数を見たのを覚えていますか?