220 36473 <2503165.NFYEXWA1nm@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Treating local variables as rvalues in return statements
Date: Wed, 03 Jan 2018 11:50:01 -0200
Lines: 37
Approved: news@gmane.org
Message-ID: <2503165.NFYEXWA1nm@tjmaciei-mobl1>
References: <4ff5fe2d-0945-491f-9888-479b8e866ace@isocpp.org> <3356554.N1GgDjyayG@tjmaciei-mobl1> <CAA7U3HMDj3r5M70izHb30+o1xHqUhgYX2KERBvvvgeAsq--muA@mail.gmail.com>
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 1514987288 11451 195.159.176.226 (3 Jan 2018 13:48:08 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 3 Jan 2018 13:48:08 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBDF7WPJAKGQELPKVSJY@isocpp.org Wed Jan 03 14:48:03 2018
Return-path: <std-proposals+bncBCB4TK757YBRBDF7WPJAKGQELPKVSJY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f200.google.com ([209.85.220.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBDF7WPJAKGQELPKVSJY@isocpp.org>)
	id 1eWjOk-0002ek-8Y
	for gclcip-std-proposals@m.gmane.org; Wed, 03 Jan 2018 14:48:02 +0100
Original-Received: by mail-qk0-f200.google.com with SMTP id h17sf799485qkj.23
        for <gclcip-std-proposals@m.gmane.org>; Wed, 03 Jan 2018 05:50:05 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1514987405; cv=pass;
        d=google.com; s=arc-20160816;
        b=O+fRi+cxfazrny6Usnv8WDoJspCvckJ81uxmUnIdbOtrhOwkTHl4Amv3ETEDEgWxR9
         Qj42TDvp7GKZSVAAaZJJ050LA5AnXSpfHfXZcG5SUYYH/aj1S5ZAa6shpZaFM61FdOx0
         wEDcJsHrITEqJMsLlnj023J6IYZ9V5gH0Zd4xkPFQkyCOXjorL+AWhrtv1BqLfWMaaJ+
         sUP7EcaLbJ3cczGwXVp06TFgDtTJqIlTw6rfNp8PDORlFNYSrE/oZJnOx8PwhLCXmoAe
         5TqLoxrLsln3G68Z7QZjTWIjuEwAWMdREqD027loNWXS+60opM7MvSxkXZ3l8zg5Zz04
         8ABw==
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:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=CA+EIyyLGU581dWHiEbfEVsL4PMe6eJHKaRkZf7X31c=;
        b=aXKf1TmGGkim9RqUlUNvYtXkrKgvjhkq3JH97pafHR2x/zY2GrEZXo34tWzvpA/888
         0+cpx9csjwhUjIhp9HaqH9Ejpkmn2g2fwm6n5czolZM0es4cI1KYdd+aoNwnLWyWDMcL
         C7T+lkN1TRMOEsq4XmgQJwfEI4i16lEiFLnceUQNnE8WHVqatTdNOts5ZEfC4PeUH3yo
         2HbJ2XEpH7cNHphuPfSEHMMcg1TR4nFUG1Jb+4dSdUtnVnrDyBb+oRAHVNZ8mETyrltN
         04RFPrmhH0B7Q4Cdq6ANslGTRO77+acc7W8flR4ctwmwsEDXfsTU5mkBYpueLf8KEccR
         Bv5Q==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id: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;
        bh=CA+EIyyLGU581dWHiEbfEVsL4PMe6eJHKaRkZf7X31c=;
        b=HUnAiPFBCHObDPed37gGL8AsTJM0vLlkxDKgxwpvy9dQ1GPLERdgTfcvE7aqaSm7qU
         xg3DBG9XkpxeM5kGlwx85bWSvnlMoLezltnn5piXP2ap97lpEK77GzvAD52B0A6hJO4e
         azLEfhhmb1xIZWGaF+VjLA8+D42beDdCE5XojkwyPHemag+bb6rWVeFjFv/mDjVy9olD
         HxI6husdPwNYQfqmScbkQQ/HoDga6gL+G6E5LRw5ChCoJHBuP7JrcDWDbguFLdH9kE7S
         vmbpowuKqEcnCxjHrZUnLKhV6Ygv8imcD9JyXQlKZMm8GkYhV5UMwG7SBhUqxyDiuYhn
         9I0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version: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=CA+EIyyLGU581dWHiEbfEVsL4PMe6eJHKaRkZf7X31c=;
        b=Uu/9zr9eDkYyK48Wi/pjVZclQXwr55I7Dq0oj3O9mYKR1x2lYwmHd8BSDKzAxV7HQh
         TVedm+9Wv20mFvjelhYlgtYPnPcSJQHS05rEoABd8uj5ZLYlERcPdCU87FQ0DGDppOeC
         upQo7+AvJMHLNlhmAaAekx6X+m9aCEGu19oEfwTFs0tFCWViiNrdrhZB55zXO3FoWBDG
         nGvh5vNfZj2VT3ooQ0Q7vBdJb/4ArKYM3Yu6TjxCWwaYW3r12odMrvT9qeRnFmc7kCwN
         meCKRYV96lqqqFt9USw7bJ2Fhe1MjVoYn37xOOyrIbavpKLmpyl3jzUlJjLkUJ2TG9Vm
         uBrg==
X-Gm-Message-State: AKGB3mKn/vKEhSybvxT2+beE7hs/+l9GyU8n44zE+T4mOZf7heozI3lZ
	I9hdNGqs3IU4FzjhHsgdJ+GKWQ==
X-Google-Smtp-Source: ACJfBovfO8oglKl8F4/1luFz260ETUjb55FjL9UNGuCsPBFlmZ26kXZwlYaXZlo68n8TBpY4k2gBtw==
X-Received: by 10.55.105.199 with SMTP id e190mr963456qkc.49.1514987405457;
        Wed, 03 Jan 2018 05:50:05 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.200.23.112 with SMTP id u45ls2475773qtk.9.gmail; Wed, 03 Jan
 2018 05:50:04 -0800 (PST)
X-Received: by 10.55.104.213 with SMTP id d204mr1659020qkc.190.1514987404416;
        Wed, 03 Jan 2018 05:50:04 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1514987404; cv=none;
        d=google.com; s=arc-20160816;
        b=hd9NyAYcfnNR3IUe3xXF+QqWICvnr8WlUfhtTmiG+6SxzEwx9ZpDw9YpMnjK2FVcWm
         q+SgHF/DCO4suoSqiDANEYPPn8NI47I9PTEKk1WopOEj1LLpUnfgawW5PkpjpErzyIP2
         eERRFjmGvDRl8b9cY++wS+NADJtDA+m9OMxMV2BQMC+UE2UqXEPF/Atm1QfcSGQ5fACr
         xlUQfgxJRdN/0SxysHr4vi3L0n81THmkH34stNQLfsFFbRFAPquoD9haPRyL9lQmcBXe
         rHP3WlBf3nKTcWZ0XFO8USvbRrGSRG8aYMkRjgYTe6SGE5eKG7rV3znMlvbs7yZU4jjQ
         18nA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=1Kx3ihlYZnY+8v1YgGlX5ewKOurnOAchU2gSE4Wvu/M=;
        b=dzEcCowz/Q1JfgtnPed/le8C+yZR9SP7FKGocAX/jFl/bB+Tw2ms3/rkotq7I3TJId
         bLLafFTyEpmBrMNw3ae+sV00QVQUMug4cRkrj4HConspSaLtKmXZz6FjMObnYYbN9Glz
         zlB8s1q4gWsS32lLnfH8ItKH3Xxfd7EV5bf6k0VLsrUfjA0EInufe8ebvnnKCxEVZuQ8
         GkhrfiC6/fjZcOWOPPDTrCPcjqy/GSjmWOpmwG7XnlWDpziv5HaDjRhPBLU8M70GZ/1H
         jqOURNPEOOd+AI8Pw9BHGYHd7PF13AKimll0oZXlDQy7/QI4WJ2r0110rj5peh5DELAz
         UOow==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from smtp.macieira.info (arvernien.macieira.info. [209.222.10.136])
        by mx.google.com with ESMTPS id 29si806446qtm.229.2018.01.03.05.50.04
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 03 Jan 2018 05:50:04 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 209.222.10.136 as permitted sender) client-ip=209.222.10.136;
Original-Received: from tjmaciei-mobl1.localnet (unknown [191.254.125.70])
	by smtp.macieira.info (Postfix) with ESMTPSA id 87755587D
	for <std-proposals@isocpp.org>; Wed,  3 Jan 2018 05:50:03 -0800 (PST)
In-Reply-To: <CAA7U3HMDj3r5M70izHb30+o1xHqUhgYX2KERBvvvgeAsq--muA@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 209.222.10.136 as permitted sender) smtp.mailfrom=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-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:36473
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36473>

On Wednesday, 3 January 2018 11:39:51 -02 Olaf van der Spek wrote:
> 2018-01-03 14:31 GMT+01:00 Thiago Macieira <thiago@macieira.org>:
> > On Wednesday, 3 January 2018 10:32:40 -02 Olaf van der Spek wrote:
> >> 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.
> > 
> > And how do you prove that they are?
> > 
> > Please answer in standardese, not in terms of compiler optimisations.
> 
> Why?
> An idea isn't bad just because standardese isn't available (yet).

Because I have the suspicion that it can't exist at all. The idea is bad if it 
can't be described meaningfully.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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/2503165.NFYEXWA1nm%40tjmaciei-mobl1.

.
