I'm relatively new to C++, and am trying for the first time to build a complex template structure.
How can I declare, as member of a template class Foo, a std::vector of Foo* elements, but that could be of various types?
#include <vector>
template <typename T>
class Foo {
T mValue;
std::vector< Foo<T>* > mFooParameters; // <---- I would like this vector to contain
// any sort of Foo<T>* elements,
// Foo<int>*, Foo<double>*, etc.
};
Is it straightforward, possible but complicated, or impossible?
Thank you for your answers!