This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/40828] New: Rejected valid specialization of member class template


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]