220 11810 <096f0ea4-9e8d-4a08-98eb-af856ace1c1b@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: Thu, 10 Jul 2014 08:18:34 -0700 (PDT)
Lines: 179
Approved: news@gmane.org
Message-ID: <096f0ea4-9e8d-4a08-98eb-af856ace1c1b@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_303_17011130.1405005514834"
X-Trace: ger.gmane.org 1405005536 5900 80.91.229.3 (10 Jul 2014 15:18:56 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 10 Jul 2014 15:18:56 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDNPVXXG6IGBBS657KOQKGQE5P5N3OY@isocpp.org Thu Jul 10 17:18:51 2014
Return-path: <std-proposals+bncBDNPVXXG6IGBBS657KOQKGQE5P5N3OY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f200.google.com ([209.85.223.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDNPVXXG6IGBBS657KOQKGQE5P5N3OY@isocpp.org>)
	id 1X5G7J-0006c7-KQ
	for gclcip-std-proposals@m.gmane.org; Thu, 10 Jul 2014 17:18:37 +0200
Original-Received: by mail-ie0-f200.google.com with SMTP id at20sf2412663iec.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 10 Jul 2014 08:18:36 -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=6CkDbNwCbyo4Fg4p0ZikdB98lDoJ1D4aiNKAlNodT3I=;
        b=dy1f85ur8B/bG//6OeDPOlm67HT6NM6xsXIjGRoGaB57QmujcKkOsNGvoza5vJChoF
         NaEU1/ooIZOLkKcHswGp3xQasV4vQuf1mZ7h/dHdZy0xX/WMwg4tUjfgTk5galjJ01uN
         8Z8AcxpkoLOsWZzrZIPSaNkEe0X52nOsqcaksbw92A9tl3MAeQDl1mZv//Sz14bdlegh
         wKdKZedyGvbfACeYLgAcU0FOyUSe8lNz+y4Oo7YqiWgXayVb8wJC/f3BTs15kgrIRUbi
         jPwCN4hGftTzFHW6VZ9nAJ1NojwEzXfc9RNXMLQZbN2vfmrTUs1rSnoiMW1ST4oSatAe
         qRug==
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=6CkDbNwCbyo4Fg4p0ZikdB98lDoJ1D4aiNKAlNodT3I=;
        b=O7puw4txl+7z9a6vlY5pzfPGku0X/RSlsZoKR2u4KpLufnzqxjbNy6ApgWhRxwBDx7
         bwI3VjMy9oySMNduvyZ3UWTl43RBriu31Cyozn5KKTzZPbbsfFpzVATGU1mcMJDxBVU2
         JLkhPV7HGSyvenwjfmbukTgbwFgF0ZaxtzwXYHLVBVQOVMDlp7A15SwAqdCb0gXUD0n8
         PM5aW0xL6wwjmsdCVAp1pe2zkxIbFXmzKI3cBR31rcO05fNvvHpbM1mekgaILZHcAQFB
         W94q6ZChQT22TJbflHpg+3Txt/1g9Sbu84wG8/CicPK7rk4xTRfKC+jdUmcC6P6gq5ni
         Zxew==
X-Gm-Message-State: ALoCoQmLfoRGc1VKmpOGAaFrp40c6XlM1e20vh6FfvjW9QjHHHFtdwwIKkXKu0lp2Ge5cNLH6hSl
X-Received: by 10.43.92.195 with SMTP id br3mr22800881icc.1.1405005516710;
        Thu, 10 Jul 2014 08:18:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.111.130 with SMTP id ii2ls123631obb.3.gmail; Thu, 10 Jul
 2014 08:18:35 -0700 (PDT)
X-Received: by 10.182.28.71 with SMTP id z7mr152006obg.16.1405005515620;
        Thu, 10 Jul 2014 08:18:35 -0700 (PDT)
In-Reply-To: <335948E6-8140-4673-B958-930356A52070@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:11810
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/11810>

------=_Part_303_17011130.1405005514834
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



W dniu czwartek, 10 lipca 2014 16:58:41 UTC+2 u=C5=BCytkownik David Krauss=
=20
napisa=C5=82:
>
>
> On 2014=E2=80=9307=E2=80=9310, at 10:44 PM, Ville Voutilainen <ville.vo..=
..@gmail.com=20
> <javascript:>> wrote:
>
> On 10 July 2014 17:24, David Krauss <pot...@gmail.com <javascript:>>=20
> wrote:
>
> A return-by-reference from a non-ref-discriminated accessor devolving to
> return-by-copy would regress legacy code, but that doesn=E2=80=99t make s=
uch=20
> library
> behavior semantically sound from a modern point of view.
>
>
> The "modern point of view" should include the forwarding concerns, which
> are not limited to the performance of emplace.
>
>
> Absolutely. I=E2=80=99m have an interest in this because I write this kin=
d of code.
>
> The rvalue-ref-qualified signatures need to return T&& instead of T.
> LEWG needs an NB comment
> to be able to make that fix for Fundamentals v1, and I'm going to provide
> them
> with one.
>
>
> The rvalue-ref-qualified signatures of what, std::optional? That=E2=80=99=
s not a
>
>
> Uh.. yes. That's the topic of this thread.
>
>
> Maybe I don=E2=80=99t understand the standardization process, but wouldn=
=E2=80=99t the=20
> conservative solution be to simply roll that back from N4078, so optional=
=20
> behaves the same as everything else? Adding a new feature in a particular=
=20
> way doesn=E2=80=99t fall into the category of legacy support.
>
> Optional is attempting to be the most perfect proxy class ever designed,=
=20
> and it=E2=80=99s pushing the envelope in a way that fundamentally disagre=
es with=20
> standardization. Simply put, it=E2=80=99s churning too much.
>
> The debate can=E2=80=99t be just about optional, even just in this thread=
,=20
> because the rest of the library is going to have to follow suit.
>

But having it in the optional<T> will create and existing practice will=20
make it easier to get the proposal that r-value overloads for other STL=20
container to get accepted. And maybe then we would have a full=20
implementation of this pattern in library. But without stepping stone like=
=20
optional it would be nearly impossible.

The history in short:
Firstly the following paper get published as part of 2014-05 mailing:=20
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3982.html. It adds=
=20
following overloads for the value and operator*:
  T& value() &;
  T const& value() const &;
  T&& value() &&;
And I really supported like that idea, because it makes the programmer life=
=20
easier. But then the https://isocpp.org/files/papers/N4078.html following=
=20
paper come out in 2014-07 mailing and it adds following overloads:
  T& value() &;
  T const& value() const &;
  T value() &&;
  T value() const &&;
And Anna started a thread raising an issues with this change. I hope that=
=20
clears up a think for you.
=20

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_303_17011130.1405005514834
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>W dniu czwartek, 10 lipca 2014 16:58:41 UTC+2 u=C5=
=BCytkownik David Krauss napisa=C5=82:<blockquote class=3D"gmail_quote" sty=
le=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left=
: 1ex;"><div style=3D"word-wrap:break-word"><br><div><div>On 2014=E2=80=930=
7=E2=80=9310, at 10:44 PM, Ville Voutilainen &lt;<a href=3D"javascript:" ta=
rget=3D"_blank" gdf-obfuscated-mailto=3D"1U-YOBR92nIJ" onmousedown=3D"this.=
href=3D'javascript:';return true;" onclick=3D"this.href=3D'javascript:';ret=
urn true;">ville.vo...@gmail.com</a>&gt; wrote:</div><br><blockquote type=
=3D"cite">On 10 July 2014 17:24, David Krauss &lt;<a href=3D"javascript:" t=
arget=3D"_blank" gdf-obfuscated-mailto=3D"1U-YOBR92nIJ" onmousedown=3D"this=
..href=3D'javascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;">pot...@gmail.com</a>&gt; wrote:<br><blockquote type=3D"cite">A =
return-by-reference from a non-ref-discriminated accessor devolving to<br>r=
eturn-by-copy would regress legacy code, but that doesn=E2=80=99t make such=
 library<br>behavior semantically sound from a modern point of view.<br></b=
lockquote><br>The "modern point of view" should include the forwarding conc=
erns, which<br>are not limited to the performance of emplace.<br></blockquo=
te><div><br></div><div>Absolutely. I=E2=80=99m have an interest in this bec=
ause I write this kind of code.</div><br><blockquote type=3D"cite"><blockqu=
ote type=3D"cite">The rvalue-ref-qualified signatures need to return T&amp;=
&amp; instead of T.<br>LEWG needs an NB comment<br>to be able to make that =
fix for Fundamentals v1, and I'm going to provide<br>them<br>with one.<br><=
br><br>The rvalue-ref-qualified signatures of what, std::optional? That=E2=
=80=99s not a<br></blockquote><br>Uh.. yes. That's the topic of this thread=
..<br></blockquote><div><br></div></div>Maybe I don=E2=80=99t understand the=
 standardization process, but wouldn=E2=80=99t the conservative solution be=
 to simply roll that back from N4078, so optional behaves the same as every=
thing else? Adding a new feature in a particular way doesn=E2=80=99t fall i=
nto the category of legacy support.<div><br></div><div>Optional is attempti=
ng to be the most perfect proxy class ever designed, and it=E2=80=99s pushi=
ng the envelope in a way that fundamentally disagrees with standardization.=
 Simply put, it=E2=80=99s churning too much.</div><div><br></div><div>The d=
ebate can=E2=80=99t be just about <font face=3D"Courier">optional</font>, e=
ven just in this thread, because the rest of the library is going to have t=
o follow suit.</div></div></blockquote><div><br>But having it in the option=
al&lt;T&gt; will create and existing practice will make it easier to get th=
e proposal that r-value overloads for other STL container to get accepted. =
And maybe then we would have a full implementation of this pattern in libra=
ry. But without stepping stone like optional it would be nearly impossible.=
<br><br>The history in short:<br>Firstly the following paper get published =
as part of 2014-05 mailing: http://www.open-std.org/jtc1/sc22/wg21/docs/pap=
ers/2014/n3982.html. It adds following overloads for the value and operator=
*:<br>&nbsp;  T&amp; value() &amp;;<br>&nbsp; T const&amp; value() const &a=
mp;;<br>&nbsp; T&amp;&amp; value() &amp;&amp;;<br>And I really supported li=
ke that idea, because it makes the programmer life easier. But then the htt=
ps://isocpp.org/files/papers/N4078.html following paper come out in 2014-07=
 mailing and it adds following overloads:<br>&nbsp;  T&amp; value() &amp;;<=
br>&nbsp; T const&amp; value() const &amp;;<br>&nbsp; T value() &amp;&amp;;=
<br>&nbsp; T value() const &amp;&amp;;<br>And Anna started a thread raising=
 an issues with this change. I hope that clears up a think for you.<br></di=
v><div>&nbsp;</div></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_303_17011130.1405005514834--

.
