Is it possible to have a specialized template class which is a member of a template class(that is not specialized per se)?
With a non-template parent class this works:
class owner
{
template<int num>
struct s
{
int ret() { return num; }
};
};
template<>
struct owner::s<0>
{
int ret() { return 0; }
};
But when making owner
a template class it does not:
template<typename some>
class owner
{
template<int num>
struct s
{
int ret() { return num; }
};
};
template<typename some>
struct owner<some>::s<0>
{
int ret() { return 0; }
};
Searching shows that this is not possible(?) for functions, but how about classes/structs? Specializing a templated member of a template class