Given a template class:
template<class T>
class Foo
{
public:
void FunctionThatCreatesT()
{
_object = new T;
}
private:
shared_ptr<T> _object;
}
Is it possible to somehow pass a set of constructor parameters for T to Foo (perhaps when Foo is constructed) such that Foo can use them when it creates T? A C++11 only solution is fine (so, variadics are on the table for example).