Reputation: 1284
Let's say I have a template functor :
template <class U, class V>
struct Converter
{
V& operator() (const U&, V&) const;
};
I want to "specialize" this converter over a template class and a non-template class :
template<>
struct Converter <template<class> MyTemplateClass, MyNonTemplateClass>
{
//I can't use MyTemplateClass without specializing it
//even if I don't need it to perform the computation
};
Of course, this can't work. How would you do to achieve a similar result ?
Upvotes: 0
Views: 270
Reputation: 6515
You need to move the type for template<class> MyTemplateClass
up in template declaration for Converter
.
template<class T>
struct Converter <MyTemplateClass<T>, MyNonTemplateClass>
{
//...
};
Upvotes: 3