The following code snippet does not compile any more on mainline:
==================================
template<int, int N> struct A
{
void foo();
};
template<int N> struct A<1, N>
{
void foo();
};
template<> void A<1, 2>::foo();
==================================
vectors.cc:11: error: prototype for `void A<1, N>::foo() [with int N = 2]' does
not match any in class `A<1, 2>'
vectors.cc:8: error: candidate is: void A<1, N>::foo() [with int N = 2]
vectors.cc:11: error: `void A<1, N>::foo() [with int N = 2]' and `void A<1,
N>::foo() [with int N = 2]' cannot be overloaded
vectors.cc:11: error: prototype for `void A<1, N>::foo() [with int N = 2]' does
not match any in class `A<1, 2>'
vectors.cc:8: error: candidate is: void A<1, N>::foo() [with int N = 2]
vectors.cc:11: error: `void A<1, N>::foo() [with int N = 2]' and `void A<1,
N>::foo() [with int N = 2]' cannot be overloaded
This was caused by Mark's patch
http://gcc.gnu.org/ml/gcc-cvs/2004-10/msg00316.html
Mark, could you please have a look?
--
Summary: [4.0 regression] Instantiation of specialization
rejected
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: rejects-valid, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: bangerth at dealii dot org,gcc-bugs at gcc dot gnu dot
org,mark at codesourcery dot com
OtherBugsDependingO 17522
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17936