Factory pattern using variadic template?
I have an abstract class template <class T> struct A { /* virtual methods */ }; and several concrete derived classes with various constructors // The constructor of B takes 1 input template <class T> struct B : public A<T> { B() { /* default ctor */ } B( T *input ) { /* initializer */ } // .. implement virtual methods } // The constructor of C takes 2 inputs template <class T> struct C : public A<T> { double some_member; C() { /* default ctor */ } C( T *input, double& value ) { /* initializer */ } // .. implement virtual methods } I created a Factory that returns pointers to A , and I am