If a member template of a class template is partially specialized,
the member template partial specializations are member templates of
the enclosing class template;
if the enclosing class template is instantiated (
[temp.inst],
[temp.explicit]),
a declaration for every member template partial specialization is also
instantiated as part of creating the members of the class template
specialization
. If the primary member template is explicitly specialized for a given
(implicit) specialization of the enclosing class template,
the partial specializations of the member template are ignored for this
specialization of the enclosing class template
. If a partial specialization of the member template is explicitly specialized
for a given (implicit) specialization of the enclosing class template,
the primary member template and its other partial specializations are
still considered for this specialization of the enclosing class template
. [
Example 2:
template<class T> struct A {
template<class T2> struct B {};
template<class T2> struct B<T2*> {};
};
template<> template<class T2> struct A<short>::B {};
A<char>::B<int*> abcip;
A<short>::B<int*> absip;
A<char>::B<int> abci;
—
end example]