This is the mail archive of the gcc@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 with member and friend function having the same name


> 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


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