From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: greened@eecs.umich.edu Cc: egcs@cygnus.com Subject: Re: Template members Date: Fri, 13 Feb 1998 02:04:00 -0000 Message-id: References: X-SW-Source: 1998-02/msg00597.html David Greene writes: > A quick question on template member syntax, and whether > egcs is behaving correctly: It is. > I have a line of code that looks like this (e is an STL > iterator): > myAttribute attr = (*e).getNode()->getAttribute(); The `template' keyword is mandatory just after `->' when you explicitly specify template arguments for a template member function, in order to disambiguate. If it is missing, the expression must be parsed as: (((*e).getNode()->getAttribute) < (myAttribute)) > () that is, `<' is taken as a less-than operator. -- Alexandre Oliva mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva Universidade Estadual de Campinas, SP, Brasil