home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!usc!rpi!batcomputer!munnari.oz.au!cs.mu.OZ.AU!mundil.cs.mu.OZ.AU!fjh
- From: fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: destruction of temporaries
- Message-ID: <9223502.26462@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <BszApE.49v@world.std.com> <1992Aug17.073500.24115@ericsson.se> <23466@alice.att.com> <3920@starlab.UUCP> <23487@alice.att.com> <TMB.92Aug20142610@arolla.idiap.ch> <23507@alice.att.com> <TMB.92Aug21142555@arolla.idiap.ch>
- Date: Fri, 21 Aug 1992 16:58:13 GMT
- Lines: 26
-
- tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
-
- >In article <23507@alice.att.com> ark@alice.att.com (Andrew Koenig) writes:
- >
- > The trouble comes with expressions like
- >
- > foo().bar().baz()
- >
- > where bar returns *this. If an implementation is allowed to delete
- > the result of foo() before calling baz, the roof can cave in even
- > if your defensive rules are followed.
- >
- >Read my paragraph again. I explicitly stated you shouldn't return a
- >reference to "*this".
-
- What about
-
- cout << "Hello World" << endl;
-
- Does this mean that we have to go back to printf?
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature VIRUS is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-