std::vector
does not take one argument, but two (there is Allocator
), so it cannot be matched against a template that should take only one. You need to change to either:
template <template <typename, typename> class x>
// or:
template <template <typename... > class x>
You also need to change the return type of your function because it is unlikely that x<int>
is void
.
Note that if you use the version with two typename
, you would need to specify each parameters in the return statement (e.g. x<int, std::allocator<int>>
), which is why you should prefer the variadic version (typename...
).