From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Sebor To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c++/3063: Explicit specification of a template-argument gives syntax error inside a template function. Date: Thu, 07 Jun 2001 14:46:00 -0000 Message-id: <20010607214601.4029.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00246.html List-Id: The following reply was made to PR c++/3063; it has been noted by GNATS. From: Martin Sebor To: pme@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/3063: Explicit specification of a template-argument gives syntax error inside a template function. Date: Thu, 07 Jun 2001 15:44:48 -0600 pme@gcc.gnu.org wrote: > > Synopsis: Explicit specification of a template-argument gives syntax error inside a template function. > > State-Changed-From-To: open->closed > State-Changed-By: pme > State-Changed-When: Thu Jun 7 14:35:40 2001 > State-Changed-Why: > > Not a bug. The parser thinks that < means 'less than'. > You're required by the c++ standard to write > > a.template func(); // line 15 Only in a dependent context. `a' here doesn't depend on a template parameter so `template' isn't required. I believe this is a known bug in the parser (someone else acknowledged it on this list in the past). Regards Martin > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3063&database=gcc