I need to store multiple types of a template class in a single vector.
Eg, for:
template
class templateClass{
bool someFunction()
The solutions given so far are fine though be aware that in case you were returning the template type other than bool in your example , none of these would help as the vtable slots would not be able to be measured before hand. There are actually limits , from a design point of view , for using a template oriented polymorphic solution.