This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template syntax
- From: Marco Correia <mvc at netcabo dot pt>
- To: David Carlton <david dot carlton at sun dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 22 Jul 2004 18:33:44 +0000
- Subject: Re: template syntax
- References: <200407221800.30672.mvc@netcabo.pt> <yf2u0w07xy7.fsf@kealia.sfbay.sun.com>
Thanks a lot, it worked.
Marco
On Thursday 22 July 2004 17:29, David Carlton wrote:
> Try 'v.template method<int>(3);'.
>
> I think that what's going on is that, in bla(), G++ can't assume that
> B<T1>::method is, in fact, a templated method (or, indeed, a method at
> all), since there might be a specialization of B<> for which that
> isn't true, so the C++ standard requires G++ to parse the call as if
> B<T1>::method weren't templated, so the '<' after v.method gets parsed
> as operator< instead of as the start of a template.
>
> David Carlton
> david.carlton@sun.com
--
Marco Correia <mvc@netcabo.pt>