This is the minimal code that I can't fix:
template<typename T>
class A {
template<typename S>
class B{
};
template<>
class B<int> {
};
};
when I compile I get
error: explicit specialization in non-namespace scope 'class A<T>'
What am I doing wrong? How can I fix this?
EDIT: I've seen some other answers, but from what they suggested, I should do this:
template<typename T>
class A {
template<typename S>
class B{
};
};
template<typename T>
class A<T>::B<int> {
};
But that doesn't work either...