c++/9973: parse error with legal code

lerdsuwa@gcc.gnu.org lerdsuwa@gcc.gnu.org
Thu Mar 6 14:05:00 GMT 2003


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



More information about the Gcc-prs mailing list