The following code represents a container based on std::vector
template
struct TList
{
typedef std::vector - Type;
};
You can use template template parameters as others have mentioned here. The main difficulty with this is not that dissimilar container types have dissimilar template parameters, but that the standard allows the standard containers, like vector, to have template parameters in addition to the documented, necessary ones.
You can get around this by providing your own subclass types that accept the appropriate template parameters and let any extras (which have to have defaults) be filled in my the implementation:
template < typename T > struct simple_vector : std::vector {};
Or you can use the templated typedef idiom:
template < typename T > struct retrieve_vector { typedef std::vector type; };