Template Specialization

Let's say I have a template class:

1
2
template <typename Type1, typename Type2>
class SomeClass { ... };


I want to specialize it for one specific template parameter, but the other can be anything. That was a terrible explanation, so here's an impractical implementation:

1
2
template <>
class SomeClass<Type1,void> { ... };


So the first template parameter is left alone, and can be anything. But the second template must be void. Is there any way to actually implement this? I can't find anything about it.
Search for "partial template specialization".

This should work:

1
2
template<typename Type1>
class SomeClass<Type1, void> {...};
Alright, thanks. For some reason the term 'partial' completely eluded me.
Topic archived. No new replies allowed.