This is similar to bug 14494. The following member code is rejected:
template <class T>
class Outer {
template <class U> class Inner {};
};
template <class T>
template <>
class Outer<T>::Inner<int> {}; /* error */
with error:
test.cpp:7: error: invalid explicit specialization before â>â token
test.cpp:7: error: enclosing class templates are not explicitly specialized
test.cpp:8: error: template parameters not used in partial specialization:
test.cpp:8: error: âTâ
Of interest, the following partial specialization compiles:
template <class T>
class Outer {
template <class U> class Inner {};
};
template <class T>
template <class U>
class Outer<T>::Inner<U *> {};
--
Summary: Rejected valid specialization of member class template
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andhow at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40828