If the name doesn't make sense, here is the gist of the problem:
template <template <class> class ContainerOf>
class Foo;
template <>
class Foo<boost::optional> // works!
{
};
template <>
class Foo<std::vector>
{
};
In essence, I want to specialize in different templates that take one type parameter. However, many templates in STL and other places have other parameters, such as Allocators and Compare (for example, std :: map). It doesnβt bother me. I want to specialize in std :: vector with a "hole", where T.
Thoughts? I feel like I need some kind of wrapper objects or some kind of indirect relation to achieve this - it will also probably change the way you instantiate these templates.
source
share