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