[Bug c++/32071] New: Partial explicit specialization template parameters not checked
andrew dot stubbs at st dot com
gcc-bugzilla@gcc.gnu.org
Thu May 24 13:46:00 GMT 2007
The following C++ code should not compile:
template<class T1>
class C
{
template<class T2>
class C2 { };
};
template<> template<class X, class Y>
class C<int>::C2 { };
template<> template<int>
class C<float>::C2 { };
The first specialization has too many parameters.
the second specialization has the wrong type of parameters.
The C++ standard clause 14.7.3/18 says they parameters must have the same
types. I would assume that includes whether they exist, or not.
--
Summary: Partial explicit specialization template parameters not
checked
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andrew dot stubbs at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32071
More information about the Gcc-bugs
mailing list