home *** CD-ROM | disk | FTP | other *** search
- 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
- From: pjl@sparc11.cs.uiuc.edu (Paul Lucas)
- Newsgroups: comp.std.c++
- Subject: Re: How do I... (regarding overloading)
- Message-ID: <1992Jul23.154922.26676@sunb10.cs.uiuc.edu>
- Date: 23 Jul 92 15:49:22 GMT
- References: <1992Jul21.144856.583@ualr.edu> <1992Jul21.232959.13540@sunb10.cs.uiuc.edu> <1992Jul23.012111.16784@microsoft.com>
- Sender: news@sunb10.cs.uiuc.edu
- Distribution: usa
- Organization: University of Illinois at Urbana-Champaign
- Lines: 21
-
- In <1992Jul23.012111.16784@microsoft.com> jimad@microsoft.com (Jim Adcock) writes:
-
- >In article <1992Jul21.232959.13540@sunb10.cs.uiuc.edu> pjl@sparc1.cs.uiuc.edu (Paul Lucas) writes:
- >|*****> operator= has got nothing to do with it unless the thing that []
- >| returns is itself a class object (in which case operator= would
- >| be overloaded in _that_ class--whether operator= is overloaded
- >| in _this_ class is irrelevant...unless you're doing something
- >| non-canonical). operator[] should return a reference to the
- >| thing...that's it; the assignment just happens.
-
- >The overloading of operator= becomes relevant IF some committee members
- >succeed in changing the language such that functions cannot be invoked
- >on temporaries.
-
- Why do they want to do that? If I want to call functions on
- temporaries, that's my business (and I accept any consequences).
- I think that compiler warnings are sufficient.
- --
- - Paul J. Lucas University of Illinois
- AT&T Bell Laboratories at Urbana-Champaign
- Naperville, IL pjl@cs.uiuc.edu
-