I want to create a generic class template that uses an internal concrete container to define different types. Something like that:
#include <vector>
#include <list>
template< typename F, template< class ... > class container_type = std::vector >
struct C
{
C();
template< typename U >
C(container_type< U >);
C(container_type< F >);
C(container_type< int >);
container_type< double > param;
};
C< unsigned, std::list > c;
What is the most natural way to do this? Let's say you want to mention the presence of a container dispenser in any form?
source
share