The following IMHO valid testcase is rejected on mainline and the 4.1 branch since a couple of days:
============================================================ template<typename> struct A; template<typename T, int N> struct A<T[N]> {}; template<typename T, int N> struct A<const T[N]> {}; A<const int[1]> a; ============================================================ bug.cc:7: error: ambiguous class template instantiation for 'struct A<const int [1]>' bug.cc:3: error: candidates are: struct A<T [N]> bug.cc:5: error: struct A<const T [N]> bug.cc:7: error: aggregate 'A<const int [1]> a' has incomplete type and cannot be defined The testcase is similar to the testcase g++.dg/template/partial3.C which still passes. The major difference is that we have a "int N" here and an "unsigned N" in the testsuite. Mark, this is due to your fix for PR 28595 http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00991.html Would you mind having a look? -- Summary: [4.1/4.2 regression] Template specialization with array rejected Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: rejects-valid, monitored Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28886