220 11751 <CANh-dXnBzUouc2ZAVtKco0P2ueFPvvA2uwx03Zu=trvA6vWwWg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "'Jeffrey Yasskin' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N4078: Rvalue reference overloads for value()
 method returns object by value
Date: Wed, 9 Jul 2014 12:22:13 -0700
Lines: 36
Approved: news@gmane.org
Message-ID: <CANh-dXnBzUouc2ZAVtKco0P2ueFPvvA2uwx03Zu=trvA6vWwWg@mail.gmail.com>
References: <b538efba-faf4-4ffc-a553-302b9d2ba2c0@isocpp.org>
 <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com> <CAFk2RUYVE=vq=DnYvZRRQh5Cgf5dFuxXi9H-3q-QgRJ0jMRpeQ@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 1404933759 23302 80.91.229.3 (9 Jul 2014 19:22:39 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 9 Jul 2014 19:22:39 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRB6NM62OQKGQECO35BMY@isocpp.org Wed Jul 09 21:22:35 2014
Return-path: <std-proposals+bncBDDM34EO6QDRB6NM62OQKGQECO35BMY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qg0-f69.google.com ([209.85.192.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDM34EO6QDRB6NM62OQKGQECO35BMY@isocpp.org>)
	id 1X4xRq-0008Fg-PR
	for gclcip-std-proposals@m.gmane.org; Wed, 09 Jul 2014 21:22:35 +0200
Original-Received: by mail-qg0-f69.google.com with SMTP id j107sf18052710qga.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 09 Jul 2014 12:22:34 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to: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=QOUU0Q00x8Guq5/8Uim67nM4SCVznA7115U+0Mv9wPo=;
        b=mLjgbgcDDq3bEQbDFYi3wPKAhf9vv6x/wf8NapPuc/5/S6PJe16NOxskONc5rwTzBC
         4qnMucvIyg1H8y24gzbsFd3VKeipn0ky8KkrqLgvbNu9ZOILhjT6YWvUvQcxUEoPmZk1
         FwiJRFqEnftm7lxSAT0MOQMrZ4YGAE4dejIGjaJzqFK7nOc7PKpjfuiP6ZRJYJ8qB0bo
         Q3v6ZJ8qsDPhycQ8qFsp5nMcPvyru7FNyRA7UBHKK4/6kk4IDQGKXzwVDeo9chGZ4jfB
         L/OLgiMYmYYzxQKkIcFZg9+vvi+l3QcY+rGRvOZzLu9ngJL3eTBhfNvE8Epi7PTj0n4l
         SufA==
X-Gm-Message-State: ALoCoQnOS7AHDerHT4yTO0Hmt/iduIGfzFBt/1MR2dd3dTmJhSvrJz5MVOKbHyV0C7hBWhbQdu8K
X-Received: by 10.236.164.106 with SMTP id b70mr17872266yhl.1.1404933753956;
        Wed, 09 Jul 2014 12:22:33 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.105.136 with SMTP id c8ls2568621qgf.76.gmail; Wed, 09 Jul
 2014 12:22:33 -0700 (PDT)
X-Received: by 10.58.65.40 with SMTP id u8mr12705ves.53.1404933753358;
        Wed, 09 Jul 2014 12:22:33 -0700 (PDT)
Original-Received: from mail-vc0-x232.google.com (mail-vc0-x232.google.com [2607:f8b0:400c:c03::232])
        by mx.google.com with ESMTPS id xt7si21996452veb.104.2014.07.09.12.22.33
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 09 Jul 2014 12:22:33 -0700 (PDT)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 2607:f8b0:400c:c03::232 as permitted sender) client-ip=2607:f8b0:400c:c03::232;
Original-Received: by mail-vc0-f178.google.com with SMTP id ij19so7945584vcb.23
        for <std-proposals@isocpp.org>; Wed, 09 Jul 2014 12:22:33 -0700 (PDT)
X-Received: by 10.220.5.138 with SMTP id 10mr619971vcv.67.1404933753178; Wed,
 09 Jul 2014 12:22:33 -0700 (PDT)
Original-Received: by 10.53.11.164 with HTTP; Wed, 9 Jul 2014 12:22:13 -0700 (PDT)
In-Reply-To: <CAFk2RUYVE=vq=DnYvZRRQh5Cgf5dFuxXi9H-3q-QgRJ0jMRpeQ@mail.gmail.com>
X-Original-Sender: jyasskin@google.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jyasskin@google.com designates 2607:f8b0:400c:c03::232 as permitted
 sender) smtp.mail=jyasskin@google.com;       dkim=pass header.i=@google.com;
       dmarc=pass (p=REJECT dis=NONE) header.from=google.com
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>
X-Original-From: Jeffrey Yasskin <jyasskin@google.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11751
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11751>

On Wed, Jul 9, 2014 at 12:20 PM, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
> On 9 July 2014 22:09, 'Jeffrey Yasskin' via ISO C++ Standard - Future
> Proposals <std-proposals@isocpp.org> wrote:
>> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1651 addresses:
>>
>>   std::pair<std::string, exception_ptr> g();
>>   auto&& s = g().first; //will create a dangling reference
>>
>> It's in 'ready' status, meaning it's not in C++14, but it's likely to get
>> fixed immediately after, possibly as a "defect", which would mean that most
>> compilers would implement the fix in their C++14 modes.
>>
>> I agree that I'd rather see the general issue fixed by a language change
>> (probably involving a change to the library to use the new language
>> feature). I'm ambivalent about the safety fix we have in optional<>.
>
>
> I think the "yes, moving twice is fine, but what if the move ends up
> copying?" issue
> and the "perfect-forwarding the underlying value from an optional
> becomes tricky"
> issue are worth discussing in LEWG. They certainly change my (minor) preference.

SGTM. Can you file a "NEEDS_DISCUSSION" issue on
https://issues.isocpp.org/? We'll also need an NB comment on the PDTS
if we're going to fix it for V1.

-- 

--- 
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/.

.
