This is the mail archive of the gcc-bugs@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]

Re: template bug (all versions)


> 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.

Martin


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