220 36470 <CAA7U3HPMh9VHo_16djyzT0KnzVf+ab0Nm2CoU7zFfKJqCyfJ3w@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Olaf van der Spek <olafvdspek@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Treating local variables as rvalues in return statements
Date: Wed, 3 Jan 2018 13:32:40 +0100
Lines: 22
Approved: news@gmane.org
Message-ID: <CAA7U3HPMh9VHo_16djyzT0KnzVf+ab0Nm2CoU7zFfKJqCyfJ3w@mail.gmail.com>
References: <4ff5fe2d-0945-491f-9888-479b8e866ace@isocpp.org>
 <d5b5434c-6300-4f82-92b4-a439696d6020@isocpp.org> <55bb7162-834a-4ba4-bd68-915470842430@isocpp.org>
 <1823126.nxGvHgdJMA@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1514982646 20222 195.159.176.226 (3 Jan 2018 12:30:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 3 Jan 2018 12:30:46 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5NB45SSABBB2U2WPJAKGQEO7U2N3Y@isocpp.org Wed Jan 03 13:30:42 2018
Return-path: <std-proposals+bncBC5NB45SSABBB2U2WPJAKGQEO7U2N3Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f71.google.com ([209.85.218.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5NB45SSABBB2U2WPJAKGQEO7U2N3Y@isocpp.org>)
	id 1eWiBr-0004lD-Oe
	for gclcip-std-proposals@m.gmane.org; Wed, 03 Jan 2018 13:30:39 +0100
Original-Received: by mail-oi0-f71.google.com with SMTP id y195sf559373oia.22
        for <gclcip-std-proposals@m.gmane.org>; Wed, 03 Jan 2018 04:32:43 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1514982762; cv=pass;
        d=google.com; s=arc-20160816;
        b=Xo5ts5Hln3WzkmeHPpj+YwsIvOBldxWEvf2hBb3CbtO38I90fuRw3irweQ++iqMwRz
         hk7Wvj2jNMLZiDzQIUaZqh9d8jTuwl4LZ2CkbaSxPzbaTsyr9gSddpQsWHgVHuhAGYu9
         piaFXNVuRtuV8uwURc3yDyW4iqBBly6BUbLdxptHDs4SX4WJlxIdA74xdfHNsGXS6kPi
         xWQYAMIFN7NJ3KAjNP/U5ekMXeVP1YcXM/PMW3D5JbHXPBdnQHW2RIFOlheGTtgPgqcR
         VTWMxdDXNxaN16TDANwcmsX0G/c50i//3kvuX2mqGoE20xSsotocfhnwM3oT/Rhef93V
         VKZw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=iE+JlFcs1kRa2TN/2k2tlLofgXIKfKip9MF/Z3DAJYw=;
        b=INQOdyhy0SGfLHd7CRrxbxzCCTKFfbbNjP6ez8Ff9YYD3saQNfk2re/ixpAqibGq0X
         nPZId4oLPlc/KtZe2WV3nAcC9sYwG6idDKFvqcaOZYtWXgizEs1rcm2qk/vEyKkGCUF6
         6JSIvcDQifaG0JjURUtYvpzSMZI9CNABKQIdb36eXtRkJ55kCxtK1EuRpkruCAWjYnSZ
         z90yYjXr5eVwBPTzc/DjWbj+GXt2GXJl7Z+hOlotW7wo5bkJrRP+Jqmq9oKF/zz2jYN9
         pe9RsCEdoZTuC51GLBCliLnuhhs7qcgH69hEV6cSp2PnNhDYoj9tyLwCtYnwTuPdX/xp
         Nllg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=D3+8yonm;
       spf=pass (google.com: domain of olafvdspek@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=olafvdspek@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=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;
        bh=iE+JlFcs1kRa2TN/2k2tlLofgXIKfKip9MF/Z3DAJYw=;
        b=ibSAkJrO1gYc4jJ/3zWs1vdXtJDJfFweB+1PZidfGkNgZ8sJvc12VNhHrSOPnJ9AuZ
         ix5ac5BGmv6nc4xABfZJNsaJBGIM93Dse/KWtYBo+lln3i7dqlKBwVEAZwJ128/o7f+d
         srtuGijZZ2UbgORv1oMlYRahUzsN7QowNiF7d6/Pvfn8/vIqTAktPcEBruGeK+bltvoW
         nwrlO44qpG5nqfYn41UQips4x+ZfTmW/0D0xrRY8lKXkRXcpCNgBNmSV8ogpD64MneD0
         7UWd+cioehCyrlRL4LKq3X0njF0a/XxGrp2UzMu2nOn15t0vwzxV9ojzn7w/OyKqoqVG
         gArQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=iE+JlFcs1kRa2TN/2k2tlLofgXIKfKip9MF/Z3DAJYw=;
        b=POunmIKvZrmVT2a5PGQvDrVniigL8uVLrlSkC7Zz54LCnqC09bLnaLXzG9gROn8crk
         0kQfsf5MLDdcHvBROkTab5yjR5QeRRYYCmtAO1U27LnbvOlbYgxUgeOnZl84Qc0r+8Ip
         ALyTLokEgF/3XuehF7C7/eWzjox5pkT9TpPVReZEOmHgOraCqswIFbj1pxADChuvMbYg
         eWRb4nfGyxUcOx6OMzt8Y9MQteXJk/WeShAWigqgibvzarIwq49ERUQ8WhBtzR1f8FV9
         TZHAgaXcpAYHx17Y83YBU4rf923rjMNcNL0oCyHRyMHxgf5m2lM2oweJ9d2T52fDZOPt
         MqIg==
X-Gm-Message-State: AKGB3mIt8i4H0YPMnVoWrTOufHWkMhxzRMZqNUC8pn4DRYF2csgLtf/O
	XM3AF+zaKlfnP/5nhRLA/a3BHA==
X-Google-Smtp-Source: ACJfBovkxrplB7QZY48R89ppNC7iliHTUpCnvKwF2E4TpUWmcG8VVC7fdVe8nG1GH9CoXrtJbW3T7A==
X-Received: by 10.157.43.40 with SMTP id o37mr573639otb.6.1514982762882;
        Wed, 03 Jan 2018 04:32:42 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.42.105 with SMTP id t96ls8284219ota.9.gmail; Wed, 03 Jan
 2018 04:32:42 -0800 (PST)
X-Received: by 10.157.51.98 with SMTP id u31mr605521otd.24.1514982762076;
        Wed, 03 Jan 2018 04:32:42 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1514982762; cv=none;
        d=google.com; s=arc-20160816;
        b=MHzdiJGwlzmOIcqOZlEWovTW+aiCtXnIY9rSj4xC2gQ7YlozRsbeJYeP8UYwN8gwEf
         P+mrZIX42jrV9+Ph7KyeVuytd+Uz/r0+IPsu+CfadK05LSXCiNIeIOmCmnRRCfBU1m5u
         sSz9GFP7h2ZKplQ0d4Rygy6y+JkBpfHgFIe7g551yc/SxEwiQ7oukltyiFdu1STGMn4T
         gHnRXqorg5VevLNhKtfKAUrmijPSuxiHhhwU8r+HJiye6HFSk2zdcdtbHCnEBbhmmfEo
         r2844XOHplr/hVMY6oFHItEFALo0CPSIAZR7eZ7B4vJHTNxR6zLgAdHAW/rgKDmzlMbP
         6KoQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=YrkDdh++Bv1V6cu9HbF7zTylrKHH4X85Yej4p7tn7UA=;
        b=EsyFlwhC3vVGSR0WxgmmGcSb1j2EL4mBCqnQrJVLtpk+i0qQObFuRlt1nhQYMu26oQ
         weRRsIqeahcDRNYjCd/Mxv+aFVYJKdkM4iay8EIAKLE9Xh2afrs1zMW4hj+BxI2gfqd5
         N3Z3hVVVe4vrIEqPk/qKW142TRjWN4sDduCDJko4ksjlcf8v5pFVG9yqBwMhA4JMXb6T
         4qO4LfI3J0zGyw+E3hm6bAIbDpzECxMsJNlRanO5LV/flVPDZBK6/QBJoxfH/PqrV0ls
         +jNeizyKx1lZDlmPBuKwJ+YUnq8eZdRjAaf2pzwJqxjTEOrxnVA8sjeh2jI0Zw+BHSvB
         Lnwg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=D3+8yonm;
       spf=pass (google.com: domain of olafvdspek@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=olafvdspek@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id m18sor295666otb.260.2018.01.03.04.32.42
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 03 Jan 2018 04:32:42 -0800 (PST)
Received-SPF: pass (google.com: domain of olafvdspek@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.157.31.61 with SMTP id x58mr708097otd.85.1514982761694; Wed,
 03 Jan 2018 04:32:41 -0800 (PST)
Original-Received: by 10.157.55.163 with HTTP; Wed, 3 Jan 2018 04:32:40 -0800 (PST)
In-Reply-To: <1823126.nxGvHgdJMA@tjmaciei-mobl1>
X-Original-Sender: olafvdspek@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=D3+8yonm;       spf=pass
 (google.com: domain of olafvdspek@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=olafvdspek@gmail.com;       dmarc=pass
 (p=NONE sp=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-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:36470
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36470>

2018-01-03 12:33 GMT+01:00 Thiago Macieira <thiago@macieira.org>:
> On Wednesday, 3 January 2018 08:51:05 -02 olafvdspek@gmail.com wrote:
>> Wouldn't the idea be to do the analysis and only consider it a rvalue if
>> it's NOT accessed later in the statement / function?
>
> And its address has never been taken, which also means it must never have been
> passed by reference either. That limits the usefulness too much to make it a
> feature.

Taking the address is fine as long as all references are dead by the
time it's considered an rvalue.


-- 
Olaf

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAA7U3HPMh9VHo_16djyzT0KnzVf%2Bab0Nm2CoU7zFfKJqCyfJ3w%40mail.gmail.com.

.
