No, because they are different and completely unrelated types.
However, you can use inheritance and smart pointers:
class HelloBase
{
public:
virtual ~HelloBase();
}
template <class TYPE>
class Hello : public HelloBase
{
TYPE _var;
}
std::vector<boost::shared_ptr<HelloBase> > v;
shared_ptrmay be supported by your implementation either in the namespace std::tr1, or std; you will need to check.
source
share