220 11755 <2555993.7LIlHKVULI@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N4078: Rvalue reference overloads for value()
 method returns object by value
Date: Wed, 09 Jul 2014 13:03:08 -0700
Lines: 22
Approved: news@gmane.org
Message-ID: <2555993.7LIlHKVULI@tjmaciei-mobl4>
References: <b538efba-faf4-4ffc-a553-302b9d2ba2c0@isocpp.org> <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1404936206 23111 80.91.229.3 (9 Jul 2014 20:03:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 9 Jul 2014 20:03:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRB75762OQKGQECG7LJFI@isocpp.org Wed Jul 09 22:03:20 2014
Return-path: <std-proposals+bncBCB4TK757YBRB75762OQKGQECG7LJFI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f71.google.com ([209.85.215.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRB75762OQKGQECG7LJFI@isocpp.org>)
	id 1X4y5B-0005QY-9c
	for gclcip-std-proposals@m.gmane.org; Wed, 09 Jul 2014 22:03:13 +0200
Original-Received: by mail-la0-f71.google.com with SMTP id el20sf4887701lab.10
        for <gclcip-std-proposals@m.gmane.org>; Wed, 09 Jul 2014 13:03:12 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=STY+ObWdCT+wIGLH79m8DLQcAv606Plq/X3yGnsQQoI=;
        b=i6mbJZMbiwrCVKdmH/6qI4xWNcvvRKhBVboH93u3UVIv84QrCPodVm+LPdhFb0xGdz
         YwJ+lWq2k3u1z7dG+gDZY7VhEZHzHt86Nwa8psZOl0fLajIxgVz+WI0U+jSdZjhmOqVb
         iY3pkJRdNrNRXSpqGKpUQ9FvUmC4SW61PowO8sD5uZjiASdmOgshKB5LWeEPbe+V8Euq
         W0Mjifkmiktq5Vhr1Tu2OPBOVyrR36ikrFhTJzxv4K9GriCpGtvi/bC5GtP/sdlmU9nJ
         U+Y+ThaCxLCTu9LUbguUJTdB1jRu7hnQdzuTNcoRJuD3kgHjpBH0WPh5nSktMfyDQzvI
         iLNQ==
X-Gm-Message-State: ALoCoQmDOURrBuUbK95/9B81zUOr5OOJT4091K6/PfdS226wa7vUbU19uJOhujiawb83BHaJHQ3d
X-Received: by 10.112.145.233 with SMTP id sx9mr4535649lbb.2.1404936192839;
        Wed, 09 Jul 2014 13:03:12 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.10.73 with SMTP id g9ls168503wib.14.gmail; Wed, 09 Jul
 2014 13:03:11 -0700 (PDT)
X-Received: by 10.194.184.200 with SMTP id ew8mr17734247wjc.61.1404936191582;
        Wed, 09 Jul 2014 13:03:11 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id ev7si9484286wic.48.2014.07.09.13.03.11
        for <std-proposals@isocpp.org>;
        Wed, 09 Jul 2014 13:03:11 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl4.localnet (jfdmzpr06-ext.jf.intel.com [134.134.137.75])
	by gondolin.macieira.info (Postfix) with ESMTPSA id E9FC911B3DD
	for <std-proposals@isocpp.org>; Wed,  9 Jul 2014 13:03:10 -0700 (PDT)
User-Agent: KMail/4.13 (Linux/3.11.10-17-desktop; KDE/4.13.0; x86_64; ; )
In-Reply-To: <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mail=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11755
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11755>

On Wednesday 09 July 2014 12:09:14 'Jeffrey Yasskin' via ISO C++ Standard - 
Future Proposals wrote:
>   std::pair<std::string, exception_ptr> g();
>   auto&& s = g().first; //will create a dangling reference

If you were to use auto or decltype(auto), the problem would go away, wouldn't 
it?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
