From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22781 invoked by alias); 9 Aug 2008 02:44:58 -0000 Received: (qmail 22773 invoked by uid 22791); 9 Aug 2008 02:44:57 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.244) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 09 Aug 2008 02:44:03 +0000 Received: by an-out-0708.google.com with SMTP id c28so218011ana.104 for ; Fri, 08 Aug 2008 19:44:01 -0700 (PDT) Received: by 10.100.33.13 with SMTP id g13mr4691660ang.79.1218249841612; Fri, 08 Aug 2008 19:44:01 -0700 (PDT) Received: by 10.100.47.15 with HTTP; Fri, 8 Aug 2008 19:44:01 -0700 (PDT) Message-ID: <2e393d080808081944n71bda72dkf9bba3e7a72df974@mail.gmail.com> Date: Sat, 09 Aug 2008 11:23:00 -0000 From: "corey taylor" To: "Eljay Love-Jensen" Subject: Re: Is this code wrong? Cc: "John Fine" , GCC-help In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <489CC728.5040603@verizon.net> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00083.txt.bz2 On Fri, Aug 8, 2008 at 10:24 PM, Eljay Love-Jensen wrote: > The temporary returned by ReturnAFoo in DoSomething is bound to the > reference. > > It won't be destructed until the reference goes out of scope. Really. > > I use that style often. > > (Although I can't cite chapter+verse of ISO 14882.) 12.2.5 - it is a long paragraph explaining the lifetime of the temporary bound to a reference. corey