220 11869 <52187852-ff8e-4e59-a8cf-7a29fd0a405b@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: tomaszkam@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N4078: Rvalue reference overloads for value()
 method returns object by value
Date: Fri, 11 Jul 2014 03:57:20 -0700 (PDT)
Lines: 63
Approved: news@gmane.org
Message-ID: <52187852-ff8e-4e59-a8cf-7a29fd0a405b@isocpp.org>
References: <b538efba-faf4-4ffc-a553-302b9d2ba2c0@isocpp.org>
 <CANh-dX=M7niArNp-1sCcqxaREEJSxmjMftgw7uMHN9YnZC-h+w@mail.gmail.com>
 <4DA018C3-2327-4F55-B7F8-7988EC7B789A@gmail.com> <1a858a77-310b-4591-aaf5-960c40d9f5fc@isocpp.org>
 <66AF41C1-CB37-4311-98EA-D47DBC6068DC@gmail.com> <66c38b61-7a95-4ace-b34f-2346bb334fb9@isocpp.org>
 <F1CBA358-0AD8-4ADD-99DA-6D00FCFE150F@gmail.com> <CAFk2RUZENmaMW5NwBaiF6byfhgRyPUsSmuyVjnRDhbjcfaTtQA@mail.gmail.com>
 <CC03CC1C-8487-40C8-97DF-2CA7661DAD55@gmail.com> <CAFk2RUa7-WTcL=XFYO8KMyU4rdpjDEfFM6n6SkUZ=SW_U7s5XQ@mail.gmail.com>
 <EF930317-EB97-402E-A3A0-CC46E7E2D998@gmail.com> <CAFk2RUZigiwLwFpfVXuFS8cqy38hPG3OGhGUi+iNwSYuYvyAyQ@mail.gmail.com>
 <A46ADDB4-C9B0-4163-81BE-900CD879D8C8@gmail.com> <CAFk2RUZ-DqEcMeehjH8KedYgErxKMq4O9kmeN4FZzjkXMYSsiw@mail.gmail.com>
 <6F4B3C72-9962-48DC-8527-0C89EA1B9710@gmail.com> <CAFk2RUb5xynaoQx-j4cQuXC8t-0GGc9-CZyRA2V=j6cfuNQV=g@mail.gmail.com>
 <35873CE5-ED8C-4C03-A6A1-E4132DECD91F@gmail.com> <CAFk2RUYRJSNcXykj9oPd=3EehSozf7PcX8ACM_hrqhK+Ur2V8A@mail.gmail.com>
 <335948E6-8140-4673-B958-930356A52070@gmail.com> <CAFk2RUYf+tpBvxiK00O=FncB01BWe6+SXiYBN7fixd4mhm+Z-w@mail.gmail.com>
 <76ACA175-5A44-4BE8-B49F-BAC6DA65E6B1@gmail.com> <CAFk2RUah5k9zy_mQqeNN9mec0PYkmKDZp7LVXm64dTeSLaw6nQ@mail.gmail.com>
 <4D3852AD-1AEB-44BA-941C-D645BAD19405@gmail.com> <6a4b6425-1167-40c1-acd8-3945c8cd4c74@isocpp.org>
 <13DD0D7A-A146-4667-9F30-6FB3739CDBE0@gmail.com> <CADGW59=9uFv-fXRVuBCE+3fdycqTzaqCJnuVmmaT6mOF=1=-MA@mail.gmail.com>
 <E9F36B2C-A142-4B6C-ADFD-57D0E11F2C5B@gmail.com> <CAOenAXiBW+BiUkPWdGQHS9fkyEVWJg343NXH9kRSn9owk6FmgQ@mail.gmail.com>
 <DABFDEB7-ADF9-40EC-B4DB-672205A99FEB@gmail.com> <CAFk2RUa-kPWGy29siK4dUu6jbydfwbUeuzCpYOi+b9xc4-msSg@mail.gmail.com>
 <C3BA0F43-683E-4FFE-B04C-9015EB9C7CB0@gmail.com> <CAFk2RUYzt26HjKhYCZtJ4BMrjLzu9MQvZ0ynuaULWTYbE6MBAA@mail.gmail.com>
 <6B925FF7-2940-44C7-BF1D-13209A703BA2@gmail.com> <CAA7U3HOtwZ+9M1E2GUZjmT4J6onk3EdZSnskd-1OaKHv+-wJ7g@mail.gmail.com>
 <944C9C01-865B-4215-8C91-95F01AEA256E@gmail.com> <CAA7U3HPT_z2H3E84v9vOxKhAvCnv2SB2ikJDDkR7W1M+Sd-JSg@mail.gmail.com>
 <8DC3E474-3957-40B2-B492-D4AF2FDDD451@gmail.com>
 <0ACAE525-4FB2-4932-BBD2-F0623C4EBBFB@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_176_5463280.1405076240252"
X-Trace: ger.gmane.org 1405076251 2084 80.91.229.3 (11 Jul 2014 10:57:31 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 11 Jul 2014 10:57:31 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDNPVXXG6IGBBEMG76OQKGQEQO2KMJA@isocpp.org Fri Jul 11 12:57:24 2014
Return-path: <std-proposals+bncBDNPVXXG6IGBBEMG76OQKGQEQO2KMJA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f197.google.com ([209.85.223.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDNPVXXG6IGBBEMG76OQKGQEQO2KMJA@isocpp.org>)
	id 1X5YW3-0001RJ-4W
	for gclcip-std-proposals@m.gmane.org; Fri, 11 Jul 2014 12:57:23 +0200
Original-Received: by mail-ie0-f197.google.com with SMTP id rd18sf4653967iec.8
        for <gclcip-std-proposals@m.gmane.org>; Fri, 11 Jul 2014 03:57:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=B5jNOThP9vdv4AgLNZTAwM1iwgbf6gMOu6gZb2rvzs4=;
        b=DNKxxyjv6ACrdEjOI7TJ9OO6k2Q2yQWGxTNwI/8ohoq7EDV7+4AYUHBjZ1FBmHux4J
         KaCC5SI4ZoqbDC+t2Kln9pBYqEnjvS4WOka7Kscdt8xtfAMjSZKaaV34THCkySKR0K9l
         93zCghisc337eFSZgpBa/LfOd5Yt6KSnPPcBPfzkCF1GfAv38mC5f2TUsCCxUFKoRPns
         3eU9k/Q8X1PCWm7qe3MVzX4XI+5wydD0emxzTVR4of5R0vlBjqSj6IaKoTVx6R5kr/I9
         PabL5Y6Q55xl0Bh1DWE6wRfhHr5/HHyPsJNadTeAR1IrB5PMi2I3K9+iChK18j+CfBLF
         rcuA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=B5jNOThP9vdv4AgLNZTAwM1iwgbf6gMOu6gZb2rvzs4=;
        b=gM/i7Au5wyxJ63jjTQCrxc9hwi/b238ZYt1qdkJFr04SP2SJ5QSHM1RLF2DLdIfsYW
         IEHriu5wdcVUlTLUxNBGss7N/D1QVUK4N6vZtv1oQ4C45u8Qs4aPStjW7iV1XA1tsJbU
         U22+mGEYp3eyGIKTwrrgYkkTgnw2SmKJo0TjVMiqjd7n37w+sFrLaJOkKWTGjjzOBMKr
         S2/Si2G+flxesvtsMw3ebvwtwSb452d7P4ZNDU0FhKGppEA/YJrBO07dUPZTXMeH5qCa
         kslMwW6Qz/yXSLgX+g0W1dBsNszXdmbZb1vQ1A4SCSa+I6vZNaOIxdpBx0/77uSVtnxc
         WUlA==
X-Gm-Message-State: ALoCoQlYzgHaOyMz4G08LdEgn6pd26IJlf5W9YXHi65U6CS1jZlRnp1IHIX0hEhUwlsfEHIZ2fO5
X-Received: by 10.42.123.148 with SMTP id s20mr1585949icr.8.1405076242209;
        Fri, 11 Jul 2014 03:57:22 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.76.6 with SMTP id g6ls376723obw.50.gmail; Fri, 11 Jul 2014
 03:57:21 -0700 (PDT)
X-Received: by 10.182.109.234 with SMTP id hv10mr309936obb.2.1405076241262;
        Fri, 11 Jul 2014 03:57:21 -0700 (PDT)
In-Reply-To: <0ACAE525-4FB2-4932-BBD2-F0623C4EBBFB@gmail.com>
X-Original-Sender: tomaszkam@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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:11869
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11869>

------=_Part_176_5463280.1405076240252
Content-Type: text/plain; charset=UTF-8

Do we found any other argumentation for T member()&& overload except making 
auto&& s = f; work for some cases? 

In the follwoing example:
  template<typename T>
  delctype(auto) f(T&& t) { return std::addressof(*std::forward<T>(t)); }
   
  template<typename T>
  delctype(auto) g(T&& t) { 
      auto&& ret = f(std::forward<T>(t)); 
      //will create a dangling pointer, because the liftetime of result of 
f.value() is not longer same a liftme of the owner t
   }
The making auto&& works actually breaks the auto&&. Do we really wont to 
make "auto&&" to work at some cases
in the cost of breaking other cases? 

-- 

--- 
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/.

------=_Part_176_5463280.1405076240252
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Do we found any other argumentation for T member()&amp;&am=
p; overload except making auto&amp;&amp; s =3D f; work for some cases? <br>=
<br>In the follwoing example:<br>&nbsp; template&lt;typename T&gt;<br>&nbsp=
; delctype(auto) f(T&amp;&amp; t) { return std::addressof(*std::forward&lt;=
T&gt;(t)); }<br>&nbsp;&nbsp; <br>&nbsp; template&lt;typename T&gt;<br>&nbsp=
; delctype(auto) g(T&amp;&amp; t) { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auto=
&amp;&amp; ret =3D f(std::forward&lt;T&gt;(t)); <br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; //will create a dangling pointer, because the liftetime of result o=
f f.value() is not longer same a liftme of the owner t<br>&nbsp;&nbsp; }<br=
>The making auto&amp;&amp; works actually breaks the auto&amp;&amp;. Do we =
really wont to make "auto&amp;&amp;" to work at some cases<br>in the cost o=
f breaking other cases? <br></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_176_5463280.1405076240252--

.
