This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7345: parse error when using templated member function from templated base class
- From: lerdsuwa at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, ronny at mit dot edu
- Date: 20 Jul 2002 16:13:38 -0000
- Subject: Re: c++/7345: parse error when using templated member function from templated base class
- Reply-to: lerdsuwa at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, ronny at mit dot edu, gcc-gnats at gcc dot gnu dot org
Synopsis: parse error when using templated member function from templated base class
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Sat Jul 20 09:13:38 2002
State-Changed-Why:
Not a bug. Use the following syntax
A<x>::template foo<2>()
Here 'foo<2>' is a function inside a base class that
depends on the template parameter 'x'. So the prefix
'A<x>::' is required. With the prefix, '<' will be treated
as a less-than operator (not the beginning of template
argument) unless the 'template' keyword appears
before 'foo<2>'.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7345