220 29177 <EFFD45A5-AB48-47F9-93D7-B90F85BB0789@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Initializer list for move-only types
Date: Fri, 28 Oct 2016 08:14:41 +0800
Lines: 100
Approved: news@gmane.org
Message-ID: <EFFD45A5-AB48-47F9-93D7-B90F85BB0789@gmail.com>
References: <34f09dd5-e231-4a0b-a218-48c8eabe73c5@isocpp.org> <CACGiwhFZMkmBHsfhOZXzthKhw8+kGkiiwGNu+LtXCOWHP5DOFA@mail.gmail.com> <6030c88d-626c-4cf9-a0e6-963ae3fbe708@isocpp.org> <ebe45369-2d16-4e75-802a-ea0a930aff73@isocpp.org> <CAFk2RUaVN2W9BvfzF8b4LwPOthTrz47bvqNkE8QzY7biGBfFxg@mail.gmail.com> <BAC1B984-1709-4DC9-9A65-DF3DBDB1036E@gmail.com> <CAFk2RUaHCWTJ7U_X2g09RwfCx9R02YjbSH=KTVNowUQE1mHuJQ@mail.gmail.com> <CANu6V4UtYph6qt0_251PaUjAHV4Py5TjeCXvL8qMix4zaYq8hw@mail.gmail.com> <CAFk2RUZ10e+3_PG+yiHrOj1NxuC4W_sd5ia5tR2H43cJtA5hxQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_F6124A75-E701-4889-B14A-19BC37C5D640"
X-Trace: blaine.gmane.org 1477613673 5020 195.159.176.226 (28 Oct 2016 00:14:33 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 28 Oct 2016 00:14:33 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBYNQZLAAKGQES6TYI2Q@isocpp.org Fri Oct 28 02:14:29 2016
Return-path: <std-proposals+bncBCW25A7E3QCRBYNQZLAAKGQES6TYI2Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f200.google.com ([209.85.161.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBYNQZLAAKGQES6TYI2Q@isocpp.org>)
	id 1bzuoV-0000dL-GH
	for gclcip-std-proposals@m.gmane.org; Fri, 28 Oct 2016 02:14:27 +0200
Original-Received: by mail-yw0-f200.google.com with SMTP id u124sf55968753ywg.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 27 Oct 2016 17:14:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:mime-version:subject:date:references:to:in-reply-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=ei/SOZVDiciVMPhvG5qWE85riFdEbS2kUo/JTShn+lw=;
        b=Tt2ru/rkrithgVwfwAZZJxJaLuoS/nddOqnmOMCtg+BFIKZraa/lmH6vnck2Ir+fS1
         Vts/+Sp/dh/wytS7f/OTJpFCtT4M9am5pNGI1n7UlTHVdnSyl8qzb0kwPSU7U2OCTXi/
         GDdXhO3Ls+SF5y3NxzlbFXg/RVjOJUGEhiIatr8PMIhdhlVS0czAUei3Czxe5wFDUXj2
         gUtNgC49dEAmxwVdWBtPKvmJ7/otZo9kseG55q/gZzqb3j9Nri9Ajp6Cg3SuKKpaU4zn
         Z37t6E5R+l3l+R/430bZgl27bG/0XM8PFh0R8iHzCHpqJk60JVofKeAgclfAKJOKuLX+
         XrZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :references:to:in-reply-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=ei/SOZVDiciVMPhvG5qWE85riFdEbS2kUo/JTShn+lw=;
        b=Hxq8AllY8HD1rRlkoWSEQNfl28vm1ggnC7WbsXmXvGVhykGDLlyFwbExI9pt4cIKcF
         FMu3cvvdFAqfjk+bLF3BtKoTMx0dQEFnlx0wFHbQ1dfa8/iOd27hyWcLu8qf30Vx2w8Q
         UJLA8UcHlmp4sHpF/wAL8l5b/TCup93evvdRYiKpKeGXkvhE120yN+r3WQvkwMrDoiVg
         XSdIOiVRtXldDCOT+Fq6DeWd+J3998MReAZ6+8HmJfgDP37Jns/uIkN26aPWmo50ZLMh
         VATe1Wh25vCw7ooGZ7/c6Ouf3LoPMYk6FQBHUYKbhH5AcnP00eJ42zqL/C/E1kc7xCog
         t0eg==
X-Gm-Message-State: ABUngvdGcGt0xhrBS0/ProaxwbKsthuOXtIbwcY9debPmLrM5AjECuXp4ey4UeApFhWS7w==
X-Received: by 10.36.216.198 with SMTP id b189mr30175itg.30.1477613669635;
        Thu, 27 Oct 2016 17:14:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.134.168 with SMTP id q40ls1359857ioi.23.gmail; Thu, 27 Oct
 2016 17:14:25 -0700 (PDT)
X-Received: by 10.98.44.212 with SMTP id s203mr19493849pfs.84.1477613665288;
        Thu, 27 Oct 2016 17:14:25 -0700 (PDT)
Original-Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com. [2607:f8b0:400e:c00::22e])
        by mx.google.com with ESMTPS id mj3si8584455pab.275.2016.10.27.17.14.25
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 27 Oct 2016 17:14:25 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c00::22e as permitted sender) client-ip=2607:f8b0:400e:c00::22e;
Original-Received: by mail-pf0-x22e.google.com with SMTP id 197so26429414pfu.0
        for <std-proposals@isocpp.org>; Thu, 27 Oct 2016 17:14:25 -0700 (PDT)
X-Received: by 10.98.20.146 with SMTP id 140mr19519814pfu.51.1477613664867;
        Thu, 27 Oct 2016 17:14:24 -0700 (PDT)
Original-Received: from [172.20.10.2] ([175.158.200.92])
        by smtp.gmail.com with ESMTPSA id yk6sm14196080pab.43.2016.10.27.17.14.22
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Thu, 27 Oct 2016 17:14:24 -0700 (PDT)
In-Reply-To: <CAFk2RUZ10e+3_PG+yiHrOj1NxuC4W_sd5ia5tR2H43cJtA5hxQ@mail.gmail.com>
X-Mailer: Apple Mail (2.3096.5)
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of potswa@gmail.com
 designates 2607:f8b0:400e:c00::22e as permitted sender) smtp.mailfrom=potswa@gmail.com;
       dmarc=pass (p=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-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:29177
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29177>


--Apple-Mail=_F6124A75-E701-4889-B14A-19BC37C5D640
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2016=E2=80=9310=E2=80=9327, at 3:16 PM, Ville Voutilainen <ville.vouti=
lainen@gmail.com> wrote:
>=20
> I don't necessarily know of cases outside those two examples, because tho=
se
> two examples are what changes meaning. The paper provides a similar examp=
le,
>=20
> auto ls =3D { std::string( "hello" ) }; // ls has type
> std::own_initializer_list< std::string >

This is the controversial case. In particular, a subsequent auto qs =3D ls;=
 goes from well-formed to ill-formed. I=E2=80=99m certainly open to changin=
g it, but given the variety of opinions in Kona, there should be a discussi=
on to be sure everyone=E2=80=99s on the same page. Also, the range-for case=
 may be considered separately from general deduction. Depending on whether =
the loop declaration is auto&& or an object, meaning changes only by removi=
ng constness or only by changing copy operations to moves, respectively. Ei=
ther of which is potentially breaking, but much less risky than ripping out=
 copy-constructibility.

> and also
>=20
> std::vector< std::string > vs =3D { "yizzo" }; // OK: move from sequence

This only changes meaning with a library change. Also, I was instructed to =
add motivation with a performance micro-benchmark graph showing the improve=
ment on this example. So while there may be some controversy, a proposal ch=
ange is less likely and may not touch EWG anyway.

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/EFFD45A5-AB48-47F9-93D7-B90F85BB0789%40gmail.com=
..

--Apple-Mail=_F6124A75-E701-4889-B14A-19BC37C5D640
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2016=E2=80=9310=
=E2=80=9327, at 3:16 PM, Ville Voutilainen &lt;<a href=3D"mailto:ville.vout=
ilainen@gmail.com" class=3D"">ville.voutilainen@gmail.com</a>&gt; wrote:</d=
iv><br class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">=
I don't necessarily know of cases outside those two examples, because those=
<br class=3D"">two examples are what changes meaning. The paper provides a =
similar example,<br class=3D""><br class=3D"">auto ls =3D { std::string( "h=
ello" ) }; // ls has type<br class=3D"">std::own_initializer_list&lt; std::=
string &gt;<br class=3D""></div></div></blockquote><div><br class=3D""></di=
v><div>This is the controversial case. In particular, a subsequent <font fa=
ce=3D"Courier" class=3D"">auto qs =3D ls;</font> goes from well-formed to i=
ll-formed. I=E2=80=99m certainly open to changing it, but given the variety=
 of opinions in Kona, there should be a discussion to be sure everyone=E2=
=80=99s on the same page. Also, the range-for case may be considered separa=
tely from general deduction. Depending on whether the loop declaration is&n=
bsp;<span style=3D"font-family: Courier;" class=3D"">auto&amp;&amp;</span>&=
nbsp;or an object,&nbsp;meaning changes only by removing constness or only =
by changing copy operations to moves, respectively. Either of which is pote=
ntially breaking, but much less risky than ripping out copy-constructibilit=
y.</div><br class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""=
><div class=3D"">and also<br class=3D""><br class=3D"">std::vector&lt; std:=
:string &gt; vs =3D { "yizzo" }; // OK: move from sequence<br class=3D""></=
div></div></blockquote></div><br class=3D""><div class=3D"">This only chang=
es meaning with a library change. Also, I was instructed to add motivation =
with a performance micro-benchmark graph showing the improvement on this ex=
ample. So while there may be some controversy, a proposal change is less li=
kely and may not touch EWG anyway.</div><div class=3D""><br class=3D""></di=
v></body></html>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/EFFD45A5-AB48-47F9-93D7-B90F85BB0789%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/EFFD45A5-AB48-47F9-93D7-B90F85BB0789%=
40gmail.com</a>.<br />

--Apple-Mail=_F6124A75-E701-4889-B14A-19BC37C5D640--

.
