220 11749 <CAFk2RUYVE=vq=DnYvZRRQh5Cgf5dFuxXi9H-3q-QgRJ0jMRpeQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
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 22:20:30 +0300
Lines: 30
Approved: news@gmane.org
Message-ID: <CAFk2RUYVE=vq=DnYvZRRQh5Cgf5dFuxXi9H-3q-QgRJ0jMRpeQ@mail.gmail.com>
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=UTF-8
X-Trace: ger.gmane.org 1404933639 21605 80.91.229.3 (9 Jul 2014 19:20:39 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 9 Jul 2014 19:20:39 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRB7VL62OQKGQEWY77BZQ@isocpp.org Wed Jul 09 21:20:34 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRB7VL62OQKGQEWY77BZQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f72.google.com ([209.85.220.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRB7VL62OQKGQEWY77BZQ@isocpp.org>)
	id 1X4xPs-0006ew-JH
	for gclcip-std-proposals@m.gmane.org; Wed, 09 Jul 2014 21:20:32 +0200
Original-Received: by mail-pa0-f72.google.com with SMTP id rd3sf53117162pab.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 09 Jul 2014 12:20:31 -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:date
         :message-id:subject:from: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=mx2rdpg+OSUu/eNYUCSSFJwIPzybQf8avBbUVmN8X3s=;
        b=VEwX4QCApHc9Bd8up/vmxYJVv/y8H4Ap3ycm6EvleJcGpsIQAG8yR+SB/gDf3tHEhr
         wRiJ1MRFVgetOtDzdNeX6iKF44N2TslYtf4HRVn3Fa9aJrvvkxu9uTKLUNzHhgRA7CP3
         l8zD7ZNEymqEsPf3xmEeOrUvaEuqsQh1Vnc3MS4h6KlJjC0lWhD9ZcLXNKaR05Z6KHsi
         W2y5NTBKrguAThRUbimG1ZuFam4B/EjCgb4wxrOo99A13dV18pxoxDoelwdiYNgcqSxD
         qJbXa2Si93Ihu+9XOIjSVNGeR//fOMbQNTdkalaXeZThjDrI0314RWJ44RAyPFkjUf/r
         edOQ==
X-Gm-Message-State: ALoCoQknrPewHsu3oHcoyje/y0P23at9DQCJS/udims1EZudk6IgyqZEpJmRKzF5nYUGfEph3e0v
X-Received: by 10.66.169.79 with SMTP id ac15mr13022843pac.48.1404933631515;
        Wed, 09 Jul 2014 12:20:31 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.39.6 with SMTP id u6ls396622qgu.59.gmail; Wed, 09 Jul 2014
 12:20:30 -0700 (PDT)
X-Received: by 10.58.234.103 with SMTP id ud7mr41818935vec.24.1404933630654;
        Wed, 09 Jul 2014 12:20:30 -0700 (PDT)
Original-Received: from mail-vc0-x230.google.com (mail-vc0-x230.google.com [2607:f8b0:400c:c03::230])
        by mx.google.com with ESMTPS id ad18si22008504vec.43.2014.07.09.12.20.30
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 09 Jul 2014 12:20:30 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c03::230 as permitted sender) client-ip=2607:f8b0:400c:c03::230;
Original-Received: by mail-vc0-f176.google.com with SMTP id ik5so7942854vcb.21
        for <std-proposals@isocpp.org>; Wed, 09 Jul 2014 12:20:30 -0700 (PDT)
X-Received: by 10.220.192.129 with SMTP id dq1mr1993232vcb.57.1404933630567;
 Wed, 09 Jul 2014 12:20:30 -0700 (PDT)
Original-Received: by 10.224.31.137 with HTTP; Wed, 9 Jul 2014 12:20:30 -0700 (PDT)
In-Reply-To: <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c03::230 as
 permitted sender) smtp.mail=ville.voutilainen@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.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>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11749
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11749>

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.

-- 

--- 
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/.

.
