home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17927 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.2 KB

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