template bug (all versions)
Alexandre Oliva
oliva@lsd.ic.unicamp.br
Wed Mar 15 02:01:00 GMT 2000
On Mar 5, 2000, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> wrote:
>> Yup. A work-around that sometimes works is to add `template' between
>> `.' and `f', even though `x' is not template-dependent in this case
>> and this would make the code ill-formed according to the standard :-(
> Why is that? It then becomes a postfix-expression (5.2) of the form
> postfixÃÂexpression . template-opt idÃÂexpression
> I can't find a restriction that this version is only available in case
> some names are template-dependent, neither in 5.2.5, nor in 3.4.5, nor
> in 14.2. Note that 14.2/3 requires it in case the postfix-expression
> is dependent, and 14.2./4 makes it ill-formed if the id-expression
> does not denote a member template.
I think you're right. I used to believe writing `template' after a
template-independent qualifier was ill-formed, but I can't find any
wording in the Standard to support this claim. I must have misread
this section in the past, or I just confused this with some other
issue. Sorry.
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
More information about the Gcc-bugs
mailing list