home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / std / cplus / 924 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.6 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!sunb10.cs.uiuc.edu!sparc11.cs.uiuc.edu!pjl
  2. From: pjl@sparc11.cs.uiuc.edu (Paul Lucas)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: How do I... (regarding overloading)
  5. Message-ID: <1992Jul23.154922.26676@sunb10.cs.uiuc.edu>
  6. Date: 23 Jul 92 15:49:22 GMT
  7. References: <1992Jul21.144856.583@ualr.edu> <1992Jul21.232959.13540@sunb10.cs.uiuc.edu> <1992Jul23.012111.16784@microsoft.com>
  8. Sender: news@sunb10.cs.uiuc.edu
  9. Distribution: usa
  10. Organization: University of Illinois at Urbana-Champaign
  11. Lines: 21
  12.  
  13. In <1992Jul23.012111.16784@microsoft.com> jimad@microsoft.com (Jim Adcock) writes:
  14.  
  15. >In article <1992Jul21.232959.13540@sunb10.cs.uiuc.edu> pjl@sparc1.cs.uiuc.edu (Paul Lucas) writes:
  16. >|*****>    operator= has got nothing to do with it unless the thing that []
  17. >|    returns is itself a class object (in which case operator= would
  18. >|    be overloaded in _that_ class--whether operator= is overloaded
  19. >|    in _this_ class is irrelevant...unless you're doing something
  20. >|    non-canonical).  operator[] should return a reference to the
  21. >|    thing...that's it; the assignment just happens.  
  22.  
  23. >The overloading of operator= becomes relevant IF some committee members
  24. >succeed in changing the language such that functions cannot be invoked
  25. >on temporaries.
  26.  
  27.     Why do they want to do that?  If I want to call functions on
  28.     temporaries, that's my business (and I accept any consequences).
  29.     I think that compiler warnings are sufficient.
  30. -- 
  31.     - Paul J. Lucas                University of Illinois    
  32.       AT&T Bell Laboratories        at Urbana-Champaign
  33.       Naperville, IL            pjl@cs.uiuc.edu
  34.