This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40828] New: Rejected valid specialization of member class template
- From: "andhow at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2009 19:03:41 -0000
- Subject: [Bug c++/40828] New: Rejected valid specialization of member class template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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