This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12823] New: Cannot call member function template of nested class inside template class
- From: "bsamwel at xs4all dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Oct 2003 13:15:33 -0000
- Subject: [Bug c++/12823] New: Cannot call member function template of nested class inside template class
- 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=12823
Summary: Cannot call member function template of nested class
inside template class
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bsamwel at xs4all dot nl
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
AFAICS the following code should compile.
template<int a>
struct foo
{
struct barney
{
template<int c>
void bar()
{
}
};
void baz()
{
barney b;
b.bar<0>(); // (This is line 15.)
}
};
Comeau's online compiler compiles this snippet just fine. GCC 3.3.2 gives me:
gcc test.cc
test.cc: In member function `void foo<a>::baz()':
test.cc:15: error: parse error before `;' token