This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: template syntax


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]