home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12753 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.0 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
  2. From: ark@alice.att.com (Andrew Koenig)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: destruction of temporaries
  5. Message-ID: <23523@alice.att.com>
  6. Date: 22 Aug 92 04:15:51 GMT
  7. Article-I.D.: alice.23523
  8. References: <1992Aug17.073500.24115@ericsson.se> <23466@alice.att.com> <    <TMB.92Aug19113657@arolla.idiap.ch>> <    <1992Aug20.092752.29529@mole-end.matawan.nj.us>> <TMB.92Aug21160625@arolla.idiap.ch> <rmartin.714434539@thor>
  9. Reply-To: ark@alice.UUCP ()
  10. Organization: AT&T Bell Laboratories, Murray Hill NJ
  11. Lines: 12
  12.  
  13. In article <rmartin.714434539@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  14.  
  15. > In any situation where a
  16. > pointer or reference to a temporary is being taken, the compiler
  17. > should complain.
  18.  
  19. Suppose we have class String with a member function called `size'
  20. that returns the number of characters in the string.  If f is a function
  21. that yields a String, do you really want to prohibit f().size()?
  22. -- 
  23.                 --Andrew Koenig
  24.                   ark@europa.att.com
  25.