220 36471 <3356554.N1GgDjyayG@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:31:26 -0200
Lines: 27
Approved: news@gmane.org
Message-ID: <3356554.N1GgDjyayG@tjmaciei-mobl1>
References: <4ff5fe2d-0945-491f-9888-479b8e866ace@isocpp.org> <1823126.nxGvHgdJMA@tjmaciei-mobl1> <CAA7U3HPMh9VHo_16djyzT0KnzVf+ab0Nm2CoU7zFfKJqCyfJ3w@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 1514986231 26853 195.159.176.226 (3 Jan 2018 13:30:31 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 3 Jan 2018 13:30:31 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRB25WWPJAKGQEPRCO43I@isocpp.org Wed Jan 03 14:30:27 2018
Return-path: <std-proposals+bncBCB4TK757YBRB25WWPJAKGQEPRCO43I@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+bncBCB4TK757YBRB25WWPJAKGQEPRCO43I@isocpp.org>)
	id 1eWj7h-0006ax-5m
	for gclcip-std-proposals@m.gmane.org; Wed, 03 Jan 2018 14:30:25 +0100
Original-Received: by mail-qk0-f200.google.com with SMTP id q68sf777755qke.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 03 Jan 2018 05:32:28 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1514986348; cv=pass;
        d=google.com; s=arc-20160816;
        b=oAp0E0hkQ3b5zway0IOy1w2EwLDLFIwYYJ9fSplcKU5zvfmXeX+nMoi5pg6255o0sO
         v0aAVEfUgVo9vj9i7rew+EFB+cSoHzwfUsaPw0aBS4koxaWTPaKZfTe+kyqt6oAI08D3
         wlNJe7jauAlS7AJBSq5AKt7Ub5cUXJwlBsorr7OckLTLsQTd13opoj5C7Oie9HKWGF5X
         M9/HJWwD5YajtHYrPQex8PuZaWy9C9Z7m8BDPDMNuUnmiBpV4A9qd1VDe5hFADfvUv3+
         bmmtizU2EEiF8OIzZdAXr0yTXcw70DSn+CY5UDraM4Jtv2UMNQYT0xAQZHfX4T48CpJP
         NnCg==
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=F9883TKEMpRlasFJ7ezfmKbJ3NnMwC9HYITXWABl0Co=;
        b=BzaN+y/ZLx7Qh4u76qLMP47zHbnKK7XYsPk0URl/p+PgLgd38dtmexM44/0h14kBg7
         /CnLmm1sVWBbO4mWUoamuGRI9wmKk9cWMiFJMlEea+DcoC3iL28p98C4iadJQ3/ec/Tx
         exxfXOlroPDi0XnAODE0aDGcZCthkt9qnNHnLfotSEcDOftgkD7hL+UTQPTtzb8qFW8B
         k+4yqOk8IJy9EJGA/9AQWcY4zusEEaUSfxZeKgv4fi9UAI1h94nPZkW+CF0cNw7yvCek
         FzfHI9xKjQy+FioP6XiinvchblHm4G3DBE07Fm5peANzRJ3A+CTCmK65kWLBE+FYwM3y
         oW7w==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 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=F9883TKEMpRlasFJ7ezfmKbJ3NnMwC9HYITXWABl0Co=;
        b=MT1oAsMzuXlNZmbviiCnHb6o0k0Vj1M4acLJX3/RqpaulFkMnknqSlvUa72V4n/vdu
         7rl80et+/NUajZfHpnTAoF4ROKQI29vKTQsaIiNYq3AKOXhYxqmO/+m3nI0mnzBBZM5e
         atVAg5UBv1oc92OULx3UMAAEWwpqHA5SK7lcOwsCc1q12ILTd4fdFIUv8gxGFf/G/G+P
         q3c4ZjgIG4znKKibs79EZnXhASYL3JumzMHRiQaqVKUoBJorG/x2qtqA+MgYFPX9teHy
         oCkQLEbc69wqIp67mtC2CEfhWxBXeG4t9MCaNmmClUDuDYzCngPT+Wz/ewK9lepOHMbR
         YA7w==
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=F9883TKEMpRlasFJ7ezfmKbJ3NnMwC9HYITXWABl0Co=;
        b=GQx+Xj9L4Y5mo8EEacokrSlAT9Qw/gdYHYG5f0yD71bE7925iWepCYxfvE1raD0GXv
         AaELZNJCKKCWooFJo26e+AbuYeiFtYjOXS2RndB2+MEmNySEP34WIK21tSdH3luJOJrG
         zG6PSspJtPuEc8mgVasAumJq0nF3xQzHS/P+iZsJkndWYVdWdX95RX2yWXGb/CrIlrXy
         9xEms7UkWb5IurXXwg4k6zBLFOSkvCHR//4apalmmQ86WNEKjE50e2mQ0FOoc/+4NzTl
         mZtuhi3QiOYXal8WMyoySokwe3hWpMi0y0luPRuEv/csoQnPtL/BYgVusyn7ATk0b+DJ
         l0zQ==
X-Gm-Message-State: AKGB3mLA/62AxbVMbpWuxTjtE7kCO5DhqmFzlhZrHckjJmk1X21qCq9C
	9t8/5WZ+nI/NbRjwBBipCfDtUA==
X-Google-Smtp-Source: ACJfBou7dZN9eAx0DurQNvVwNe907cF+ynhS6xrCjGxpjeCmmKkKtsmZOTBF20cbi6g6u6xH/r9Uzg==
X-Received: by 10.200.3.201 with SMTP id z9mr936992qtg.13.1514986348238;
        Wed, 03 Jan 2018 05:32:28 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.55.146.67 with SMTP id u64ls2502429qkd.0.gmail; Wed, 03 Jan
 2018 05:32:27 -0800 (PST)
X-Received: by 10.55.121.199 with SMTP id u190mr1634862qkc.267.1514986346999;
        Wed, 03 Jan 2018 05:32:26 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1514986346; cv=none;
        d=google.com; s=arc-20160816;
        b=xX1neqdbng/8XHy8NBXCt9NhJRom+xOHWvja3Spg9mXUCcxjDGOHCe3/1vs/MVItGK
         3RytBqFdSWyhDy+u0yDOkZlJqMpuAGYlYbIEZ+GS12hltOGWbJWdTd1Em5sOvlAyLbBC
         io3XVosLOT7egTFCxO33FgvbaxXpHC0T0rpD+pPpNUT/1fNNUj8FrYz+7FMiR2oNcFlt
         fu0++bsE4bkLULMx0/okYVBTnzBw39czdIvwkRrVmiNjppjLtZtD8r9Df22bmJf1kgMW
         zeKgOUX2G/2Ao3GGPeWvjkLkq066e4anU/UrONfTHt21rC3CaGR1O/2P4uKjf9zhphh3
         KJeA==
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=tGCPG+lFYrlmv0YIYFYq9L1A0f39LM5pBXUH/z+sGQc=;
        b=AxIIUg9tnedyqlBUpb5tpESzPUWUCwgO7Q/wGBkmtY161i9nj6xyFYm2CueXOpOpH6
         XuT2+7WhpuF82jZYRONGzdB1j69rsCe+aLsERlMCAywWcQFt4o2eVZjEXLRSYLYQX2vi
         i2FcJB1tDVzvkBa51htAM5/3S76f5AfV9QkGDpTc5WrlsEULQvYWB/NljyR9i6g/hE38
         jFqkM5HfHGCIEMlK0a/NYpSZNezylBDBEF/LuXHZ7aBqmxD56QKXdI7zSfOCsm9WsO0c
         8mm/zTscVVnQ88R2mM2M4aogeuKL/jX9WTRIAKyu3RrT1eae3T6GwR4kb8kYnzn5SoO0
         AVyA==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from smtp.macieira.info (smtp.macieira.info. [2001:19f0:5:2221::1:3])
        by mx.google.com with ESMTPS id g42si767794qta.431.2018.01.03.05.32.26
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 03 Jan 2018 05:32:26 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 as permitted sender) client-ip=2001:19f0:5:2221::1:3;
Original-Received: from tjmaciei-mobl1.localnet (unknown [191.254.125.70])
	by smtp.macieira.info (Postfix) with ESMTPSA id 8EDF35873
	for <std-proposals@isocpp.org>; Wed,  3 Jan 2018 05:31:33 -0800 (PST)
In-Reply-To: <CAA7U3HPMh9VHo_16djyzT0KnzVf+ab0Nm2CoU7zFfKJqCyfJ3w@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 2001:19f0:5:2221::1:3 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:36471
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36471>

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.

-- 
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/3356554.N1GgDjyayG%40tjmaciei-mobl1.

.
