I have code:
#include
template class>
struct Foo
{
enum { n = 77 };
};
template
Clang is wrong to reject the partial specialization. To know how to interpret the errormessage, you need to understand what clang diagnoses. It means to diagnose a partial specialization whose arguments match exactly the implicit argument list of the primary class template (
).
However the argument lists are differently so clang shall not diagnose it. In particular this has nothing to do wheter the partial specialization matches more or less arguments. Consider
template class C;
template class C {};
The partial specialization here matches everything and not more that the primary template would match. And the argument lists of both templates are different so this partial specialization is valid, just like you'rs.