Assuming that you want to template std::vector<std::vector<int>>
: there are two possibilities:
- Use a weak type, e.g.
void*
and take care of conversion inside the class. - Implement an interface for every type you want to support.
For the second option it is enough to instantiate the template class for every type, so that the compiler knows which types are used.
Also have a look at this related question: pimpl for a templated class.