problem with this->

Alexandre Oliva oliva@dcc.unicamp.br
Thu Dec 3 12:55:00 GMT 1998


On Dec  3, 1998, Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr> wrote:

>>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> wrote:
>> On Dec  2, 1998, Milos Grundman <grundman@mip.ups-tlse.fr> wrote:
>>> // it works without "this->"
>>> template <int j> int f() const { return this->f<j-1>(); };

>> Same problem here, you need to prefix `f' with `template' for it to be
>> correctly parsed by egcs 1.1. :-(

> Isn't that the required syntax? (I don't have my copy of the standard
> right here) 

Nope, it is only required if the type of the expression before `->' or
`.' is template-dependent.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list