I wanted to create a type that holds a generic type type, that, itself, is a template with one argument. So, if my type is called C
, it could be summarized like C<T<U>>
.
So, I went for it:
#include <vector>
template <template<typename> class T>
class C
{
// implementation here
};
int main() {
C<std::vector<int>> myType;
}
And I am facing this error:
<source>:10:7: error: template argument for template template parameter must be a class template or type alias template
C<std::vector<int>> myType;
^
1 error generated.
ASM generation compiler returned: 1
What is the correct way of force a template to take a type that itself, is a template that expects other template argument?