This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2004 16:59:59 -0000
- Subject: [Bug c++/16162] New: [3.4/3.5 regression] Rejects valid member-template-definition
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Here's a particularly bad regression on the 3.4 branch, since there does
not seem to be a way to work around the problem. This code should be
valid:
--------------------
template <int N> struct O {
struct I {
template <typename T> struct II {
void f();
};
};
};
template <int N>
template <typename T>
void O<N>::I::II<T>::f () {}
--------------------
However, 3.4 branch and mainline reject the code:
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:15: error: non-template `II' used as template
x.cc:15: error: (use `typename O<N>::I::template II' to indicate that it is a
template)
x.cc:15: error: expected init-declarator at end of input
x.cc:15: error: expected `;' at end of input
No fun :-((
W.
--
Summary: [3.4/3.5 regression] Rejects valid member-template-
definition
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org,mmitchel at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16162