This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: template bug (all versions)
- To: oliva at lsd dot ic dot unicamp dot br
- Subject: Re: template bug (all versions)
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 5 Mar 2000 10:46:20 +0100
- CC: carlo at alinoe dot com, gcc-bugs at gcc dot gnu dot org
- References: <20000305024956.A22351@a2000.nl> <m2n1oenkfo.fsf@localhost.localdomain>
> 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
postfixexpression . template-opt idexpression
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.
Martin