220 36472 <CAA7U3HMDj3r5M70izHb30+o1xHqUhgYX2KERBvvvgeAsq--muA@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 14:39:51 +0100
Lines: 34
Approved: news@gmane.org
Message-ID: <CAA7U3HMDj3r5M70izHb30+o1xHqUhgYX2KERBvvvgeAsq--muA@mail.gmail.com>
References: <4ff5fe2d-0945-491f-9888-479b8e866ace@isocpp.org>
 <1823126.nxGvHgdJMA@tjmaciei-mobl1> <CAA7U3HPMh9VHo_16djyzT0KnzVf+ab0Nm2CoU7zFfKJqCyfJ3w@mail.gmail.com>
 <3356554.N1GgDjyayG@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 1514986683 3378 195.159.176.226 (3 Jan 2018 13:38:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 3 Jan 2018 13:38:03 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5NB45SSABBBKV2WPJAKGQEMUEEEKI@isocpp.org Wed Jan 03 14:37:59 2018
Return-path: <std-proposals+bncBC5NB45SSABBBKV2WPJAKGQEMUEEEKI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5NB45SSABBBKV2WPJAKGQEMUEEEKI@isocpp.org>)
	id 1eWjEu-0008VI-83
	for gclcip-std-proposals@m.gmane.org; Wed, 03 Jan 2018 14:37:52 +0100
Original-Received: by mail-oi0-f70.google.com with SMTP id s16sf633600oih.11
        for <gclcip-std-proposals@m.gmane.org>; Wed, 03 Jan 2018 05:39:55 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1514986795; cv=pass;
        d=google.com; s=arc-20160816;
        b=RZ/GidqAItCjfqJPqsSJ5Bv6VLG4j/lKWCyIoY0/L9nVs0eseL2I8YrTBj4CiQe7eu
         yoAbQyZgJ6d7x8jS0AeDDoCkAzRTgqi/s8qBQaVy+ruthXlkl1CIuZZqppmbsYepIKjG
         Y3DUNLOdKRYAAipOWNODInevHqP50bUzlmK/gbnX+/bLsnypQFhLqunLa5YTYZKJjkdL
         w15S9P4/lanZgtPAO3+bVtxGAdLVoGzR+OX/9ej72X9DuBHNnXaNl+XjBoO9ofIadfP0
         Z3iucB0agY+mrATwZL945F9ej85DiaSL1PwXGQP/0XvLXFw3yNQkPzUvcC52+UklFJJH
         MrNA==
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=bKCYf21f386aISYaOqfCRo0dSqfHbE4SwSUHsQv2du8=;
        b=udv69DvrN+CVKvae+b9dTQF8wqad+Hyj1WfbeZFskVX9GZhaOJ4/DbSmOM4EqHZ7cz
         wvOQi+UUSzQ2L6E+5gA3q/T1vb73XYjwiMhWf4T4Veev6iWvng1AHGszPPS0H/Kaqr05
         ZDGqjxZHeAWfwscB1zLD5XinGl3qkdyJwFN7IQYxMK19M8dmzX4O37pQhNUH4FKSz2zM
         hmm4M4eAtm2P2ahsIDTv62onzd7atkMiyGq1YFj8EtPKQpeQ7+vE6lTySDPnvBk5yQLG
         pQ6pnOaoy2xefEN92Bx0q+fEzxmn4VZ6Oz251ZIwH4JLk1qOs37aqcyRIwfnuIzfDycB
         7u/g==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=ipLAn9pp;
       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=bKCYf21f386aISYaOqfCRo0dSqfHbE4SwSUHsQv2du8=;
        b=uQzo6+p7J/qg7xrAy+Y5HjecFk2fFi8HtqxsH3Rj+EDlbPicqphu/VYbULOsIJ5fIv
         oef68Dfv6zWFQRDOYrmHJvxH8M2C8Okrs1wTMCbAHvTLWXZReQ7qJHCAUr+MWzooGVmd
         H2dyLCIshVJlHWZ70EcZOcaXl7cRS/nIYrinWd4BBh4SoXAEZyNafGrktClVIYDuFcVr
         gs8EXA74axH4o2X52UIsxHo21q727wGxLxEleg0fA4mhaNn/TPiA6yFCOuP4TTjVtX9S
         RW1pX1m0s+w32U7K5Q+uFLuFsjCEbivzUEZF/TfzyTwJG4wkYgw3oYiU/SVm7WHgXSNd
         Qdsg==
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=bKCYf21f386aISYaOqfCRo0dSqfHbE4SwSUHsQv2du8=;
        b=ijygoIkBIdOT5Y6WHXey5ndoCuIz5VMJT2/C92o9SuGu9fUUrgt4kZyujOG4zGl3hD
         MI+RlA0v8/BMiW/QqvguvgijvLbYpc/2qAj81QtROGrUGsfeVYrneicJ4+raETWxg1e3
         NtqK//qPVWJr27eVjxKqphRXZpKqvpVSY7RgWhwNa+soVvQGN1XS+yj0rqKncqvhseeC
         gojL0xZjOafg6BFysCCok07LCKlDVVqsP9cIAA65THB3zK+tkfgbsfPd2WU2rin4Ybmb
         i69bykg5HoLUDpWv9ujzkZ5JPKCj3UcGxor8A28oi/96dyxnUi+mBR4foqvJ3WyWhd5r
         bmbQ==
X-Gm-Message-State: AKGB3mLPhvV/Ci4gawIoYhQI2/EciS86j+3yCmi1MT8Rpm2rwZanPdy5
	2jslnL7Z/hj/uIMU4WmMWyoOjA==
X-Google-Smtp-Source: ACJfBos+690IcMiiXJ7NBsbZoZG0THcXbAK+Ty4GKNp+Qyc2x44O1N25oAj8bHKaevoa2wO8cfBWXQ==
X-Received: by 10.157.41.242 with SMTP id g47mr646031otd.122.1514986795146;
        Wed, 03 Jan 2018 05:39:55 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.19.14 with SMTP id f14ls4987564ote.1.gmail; Wed, 03 Jan
 2018 05:39:54 -0800 (PST)
X-Received: by 10.157.11.245 with SMTP id 108mr692020oth.366.1514986794117;
        Wed, 03 Jan 2018 05:39:54 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1514986794; cv=none;
        d=google.com; s=arc-20160816;
        b=yg1qI1C6gcw+ibeRqsbPsB1YSqrBWt4JTYzagJwaHkyE2W4qMrdYNeHe2VmJqBYv/I
         yRNaXx7RSFxBcpncAqNBi4dTym7q46lX3lE0J7SdUaXBhmINlm+g+XrZ/Z2ETKsjs6ZB
         0gCqaXhopNvlz6t0HzpsyCKXM9rJzh6Xknhe7phPRAWbeu2RVzt2rAR+jgz9CunenhIO
         wvwHVtkxjqL8S6Miu9tjgsuawzNZ9hm6PNDbC4fDo9fLqgFWZGxxjBbmXHJWeuXFJX7k
         /gyh1IO6gbzGQ/mVdHyHfd5+pw21mU/XN3OyLop3K4NzkJYcVjBpiYSEOQWfTgvDyR9L
         PlAg==
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=IoivZuMwe8DwmO0DNMdNVdVAhght2gywlXjetaJcpMI=;
        b=p9pgFNmjF/cApiWQr+usc7P1Cf4kKuE0qFvwwM0jswAeUeVlb3HORyxf2346V/WEj/
         q3ab1oUbeaeXn31+P1fEcA223VIBGAylknuPIG1OHUSOJ1wGMifZYAr6sDs7JAiDfLed
         eXb/zhcwSsow0SpAdu1e8sjA6fbCAiX4XybD8wwAbU+MoF6m9X20S5RrrXFaUN3hzFo7
         WKEFBPbbLFY5fGJu6Klmg74m+/X2kzVjaLEnnVMhwQyW1dx+BzrTJK6FosgfnbGbP0Dd
         MP5jKUrX1b6MHuV73lA6CMe3CxeBNEb+w3c3PXaiDIq1+VOxivaieQAXpYpniNBl7N/s
         J31Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=ipLAn9pp;
       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 w42sor331019ota.40.2018.01.03.05.39.54
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 03 Jan 2018 05:39:54 -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.44.34 with SMTP id f31mr899980otb.193.1514986792944;
 Wed, 03 Jan 2018 05:39:52 -0800 (PST)
Original-Received: by 10.157.55.163 with HTTP; Wed, 3 Jan 2018 05:39:51 -0800 (PST)
In-Reply-To: <3356554.N1GgDjyayG@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=ipLAn9pp;       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:36472
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36472>

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).

I'm also not saying this is easy to do or worthwhile to focus on BTW.


Gr,
-- 
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/CAA7U3HMDj3r5M70izHb30%2Bo1xHqUhgYX2KERBvvvgeAsq--muA%40mail.gmail.com.

.
