template with member and friend function having the same name
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Wed Mar 22 15:40:00 GMT 2000
> Is it really true that member and friend functions of a template can
> not have the same name?
Depends on what you mean by 'name'. If you are talking about qualified
names, they *never* have the same name: the methods are qualified by
their class; the friends are qualified by their namespace (unless the
friends are also methods).
> Will be the bug for theoretically correct definition
> friend A<T> ::operator- <> (const T, const A<T>&);
> fixed in next releases of gcc?
So far, it has not been fixed, and no effort is currently being made
to fix it. Essentially, you would have to rewrite the C++ parser from
scratch, and nobody has volunteered to do so. Please have a look at
http://gcc.gnu.org/cgi-bin/fom.cgi?file=12
Perhaps GMD (or Fraunhofer) would be willing to fund such a project?
:-)
Regards,
Martin
More information about the Gcc
mailing list