This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9973: parse error with legal code
- 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, scmvs at cs dot cf dot ac dot uk
- Date: 6 Mar 2003 14:05:00 -0000
- Subject: Re: c++/9973: parse error with legal code
- 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, scmvs at cs dot cf dot ac dot uk, gcc-gnats at gcc dot gnu dot org
Synopsis: parse error with legal code
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Thu Mar 6 14:05:00 2003
State-Changed-Why:
Not a bug. You have to write
x.template apply<int>();
instead. Since 'x' depends on template parameter 'Q',
the compiler don't know that 'apply' is really a template unless the 'template' keyword is given before 'apply'.
Without this keyword, '<' is treated as a less-than operator.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9973