This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Re: c++/8821: gcc 3.2 problem with overloaded inherited operator
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: andre at kiwisound dot de
- Cc: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Date: Wed, 11 Dec 2002 08:43:28 -0600 (CST)
- Subject: Re: Re: c++/8821: gcc 3.2 problem with overloaded inherited operator
> In my opinion it IS a bug because the operator of the parent class has
> another argument. So the name resolution should detect the matching
> operator in the parent class as usual in C++. I think overloaded
> operators should behave like overloaded functions (where the same thing
> works!).
Note the distinction I made between overloaded functions and overloaded
virtual functions. For some historical reason, a virtual function with a
different argument list hides a function with the same name in the base
class. This is not the case for non-virtual functions. I just don't know
how operators behave. That's the question here. I concede that the
behavior is confusing.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth