This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3012: c++ bug
- To: "Robert B. Lowrie" <lowrie at belle dot lanl dot gov>, <gcc-gnats at gcc dot gnu dot org>
- Subject: Re: c++/3012: c++ bug
- From: "Artem Khodush" <artem at duma dot gov dot ru>
- Date: Fri, 1 Jun 2001 14:28:40 +0400
- >Received: from artem by mailsrv.duma.gov.ru (SMI-8.6/SMI-SVR4)id OAA22585; Fri, 1 Jun 2001 14:31:34 +0400
- Cc: <furboo at cybermesa dot com>, <gcc-bugs at gcc dot gnu dot org>
- References: <200105311522.f4VFMMJ28208@belle.lanl.gov>
Robert B. Lowrie wrote:
> If a templated member function `foo' of even a non-templated class
> `A' is called within a templated class `B' with the syntax
> foo<double>(), the compiler gives a syntax error.
> // when B is a template, compile fails on this line:
> a.foo<double>();
Not a bug.
According to c++ grammar rules, '<' here means less-then operator.
You should write a.template foo<double>().