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