home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!ukma!cs.widener.edu!dsinc!ub!galileo.cc.rochester.edu!rochester!rit!cci632!dwr
- From: dwr@cci632.cci.com (Donald W. Rouse II)
- Newsgroups: comp.lang.c++
- Subject: Re: Who is wrong? me, BC , GNUC ?
- Message-ID: <1992Dec14.172921.18638@cci632.cci.com>
- Date: 14 Dec 92 17:29:21 GMT
- References: <1992Dec7.183809.1@cua.edu> <1992Dec8.184713.7544@taumet.com> <718@ulogic.UUCP>
- Organization: [Computer Consoles, Inc., Rochester, NY
- Lines: 26
-
- In article <718@ulogic.UUCP> hartman@ulogic.UUCP (Richard M. Hartman) writes:
- >I am confused.
- >
- >I thought overloading took into account the argument list of the
- >member function being overloaded.
- >
- >What you just said implied that if class B had not declared
- >
- > operator+=(int);
- >
- >that the inherited A::operator+=(A&) *would* be available?
-
- Yes.
-
- >
- >If not, then inheritance does not work as I understood it.
- >If so, why does a function with a different argument list
- >( B::operator+=(int) } hide the inherited one?
-
- Scope resolution occurs first. Once operator+= was found in B,
- any overloading that would occur would occur within B.
-
- > The mangled
- >names should not be equivilant....
-
- Mangled names are an implementation issue.
-