This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11323] New: Template parsing error
- From: "mleone at pixar dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2003 01:51:10 -0000
- Subject: [Bug c++/11323] New: Template parsing error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11323
Summary: Template parsing error
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mleone at pixar dot com
CC: gcc-bugs at gcc dot gnu dot org
The following is not accepted by g++ 3.2.2, but should be (it's accepted by KCC
and icc).
struct Foo {
template<typename T>
void foo() { }
};
template<typename T>
bool bar(Foo x) {
x.foo<T>();
}
This gives the following error in g++ 3.2.2 (and also in 2.9.6):
test.cpp: In function `bool bar(Foo)':
/home/mleone/tools-work/src/grail/lib/gsl/test.cpp:8: parse error before `>' token