home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12532 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.2 KB  |  28 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!decwrl!rtech!odinba!dan
  3. From: dan@BofA.com (Dan Brockman)
  4. Subject: Re: destruction of temporaries
  5. Message-ID: <1992Aug19.011846.9736@BofA.com>
  6. Organization: Bank of America, Capital Products, RMTG #5906
  7. References: <46140@sunquest.UUCP>
  8. Date: Wed, 19 Aug 92 01:18:46 GMT
  9. Lines: 17
  10.  
  11. In article <46140@sunquest.UUCP> bill@sunquest.UUCP (Bill Raves) writes:
  12. >know the details of the implementation.  What *specific* guidelines
  13. >would you suggest for avoiding potential problems with unnamed tem-
  14. >poraries?
  15.  
  16. Guideline suggestion:  I think it a useful exercise when weighing such
  17. questions to contemplate: "Could I do this sort of thing with an int?"
  18. An int is a very basic data type of C, and so serves as a model type in
  19. many respects.  If you could use an unnamed temporary int under conditions
  20. a, b, and c, then maybe an unnamed temporary object of class Foo should
  21. qualify for analogous use, and if not, then why not?
  22.  
  23. -- 
  24.  ------------------------------------------------------
  25.  Daniel Brockman                       tel 415-953-0406, fax 415-622-2892
  26.  Bank of America, Dept 5906, 555 Calif St
  27.  San Francisco 94104 USA              email uunet!odinba!dan dan@BofA.COM
  28.