This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15503] [3.4/3.5 regression] nested template problem
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2004 20:43:35 -0000
- Subject: [Bug c++/15503] [3.4/3.5 regression] nested template problem
- References: <20040517201227.15503.mark.a.anders@intel.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-17 20:43 -------
I'm sure this is legal, and icc7.1 also accepts it. Here is something
smaller:
------------------
template <typename> struct O {
template <typename> struct I {};
};
template <typename T>
struct S : O<T>::template I<int> {
S() : O<T>::template I<int>() { } ;
};
---------------------
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In constructor `S<T>::S()':
x.cc:7: error: expected class-name before "template"
x.cc:7: error: expected `(' before "template"
x.cc:7: error: expected `{' before "template"
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
x.cc: In constructor `S<T>::S()':
x.cc:7: error: expected class-name before "template"
x.cc:7: error: expected `(' before "template"
x.cc:7: error: expected `{' before "template"
In other words, this is a regression.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.4.0 3.5.0
Known to work| |3.3.4
Last reconfirmed|0000-00-00 00:00:00 |2004-05-17 20:43:34
date| |
Summary|nested template problem |[3.4/3.5 regression] nested
| |template problem
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15503