home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13037 < prev    next >
Encoding:
Text File  |  1992-08-29  |  785 b   |  18 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!secapl!Cookie!frank
  3. From: frank@Cookie.secapl.com (Frank Adams)
  4. Subject: Re: destruction of temporaries
  5. Message-ID: <1992Aug28.221841.149034@Cookie.secapl.com>
  6. Date: Fri, 28 Aug 1992 22:18:41 GMT
  7. References: <23487@alice.att.com> <MATT.92Aug19170229@physics16.berkeley.edu> <1992Aug25.175751.8117@microsoft.com>
  8. Organization: Security APL, Inc.
  9. Lines: 7
  10.  
  11. I don't claim to have a complete solution to the problem.  However, for the
  12. specific case   c ? a+b : a   where a+b creates a temporary, I would be
  13. tempted (as a compiler writer) to always return a temporary: a+b if c is
  14. true, and a copy of a otherwise.  This solves the problem of not knowing
  15. whether a temporary has been created.
  16.  
  17. Is this legal under the proposed C++ specification?
  18.