220 5221 <10c2a060-47cc-47bc-9114-c599c4986f4f@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: tomaszkam@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: brace-intialization and C++14 generalized lambda capture
Date: Tue, 25 Jun 2013 11:44:55 -0700 (PDT)
Lines: 95
Approved: news@gmane.org
Message-ID: <10c2a060-47cc-47bc-9114-c599c4986f4f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_586_13055401.1372185895504"
X-Trace: ger.gmane.org 1372185896 13596 80.91.229.3 (25 Jun 2013 18:44:56 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 25 Jun 2013 18:44:56 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDNPVXXG6IGBBKGKU6HAKGQEEN4JK4I@isocpp.org Tue Jun 25 20:44:58 2013
Return-path: <std-proposals+bncBDNPVXXG6IGBBKGKU6HAKGQEEN4JK4I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ve0-f198.google.com ([209.85.128.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDNPVXXG6IGBBKGKU6HAKGQEEN4JK4I@isocpp.org>)
	id 1UrYEb-0008JI-Am
	for gclcip-std-proposals@m.gmane.org; Tue, 25 Jun 2013 20:44:57 +0200
Original-Received: by mail-ve0-f198.google.com with SMTP id jz10sf18265509veb.1
        for <gclcip-std-proposals@m.gmane.org>; Tue, 25 Jun 2013 11:44:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-beenthere:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-google-group-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=AA84YtAV+mw75cDZkFgbdcbAkx7Fs1tXmeNzYOSesV0=;
        b=vM1g0r31bxWxZraq8FirQU8bDvD6zPk0hcsPMYHNMafUe1VV5h37m4L1fo9T/aKDNu
         crAu5wlVDQZWHTqUYwilRLWVjTm2BGxH3VsVV7FhbUgNfUJNZ3Z8Ww+ZtuGJ+hMrdGSX
         ht4saLIblegriv1RAoHRCeqEXX1TmfAy3CsyjPQzIPhB5E11hyXPAsL3Cwm9dV8mKMBt
         M1M60lsM+Gn0sL3ztIZJsn/p4OIg3kHAFLpkf1MEonYeotcxM7jY+ZNSQDBTWkfpvACY
         JGEhmact5MN1Px7l7UwKj0tlzC3y87LxJ4XzytZ/3Oe1dfQVRLA5AdZWADv6jkEGl5+2
         kbPg==
X-Received: by 10.236.223.162 with SMTP id v32mr178928yhp.25.1372185896513;
        Tue, 25 Jun 2013 11:44:56 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.120.234 with SMTP id lf10ls122886qeb.49.gmail; Tue, 25 Jun
 2013 11:44:55 -0700 (PDT)
X-Received: by 10.49.58.242 with SMTP id u18mr11873qeq.23.1372185895884;
        Tue, 25 Jun 2013 11:44:55 -0700 (PDT)
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5221
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5221>

------=_Part_586_13055401.1372185895504
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

The C++14 CD (N3690) at the paragraph $5.1.2/11, says:
For every init-capture a non-static data member named by the identifier of=
=20
the init-capture is declared in
the closure type. This member is not a bit-field and not mutable. The type=
=20
of that member corresponds to
the type of a hypothetical variable declaration of the form =93auto=20
init-capture ;=94, except that the variable
name (i.e., the identifier of the init-capture) is replaced by a unique=20
identifier.

As I understand this means that the type of member x declared in lambda=20
capture as [x{std::move(uniq_ptr)}] () {} will be the same as would be for=
=20
the expression auto x{std::move(unique_ptr)}. That means that type of x=20
would be std::initializer_list<std::unique_ptr<int>> (assuming that type of=
=20
unique_ptr is std::unique_ptr<int>). in contrast the original prposal<http:=
//www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3610.html>contains of l=
ambda example [=20
x { move(x) }, y =3D transform(y, z), foo, bar, baz ] { ... }, which sugges=
t=20
that type of x would be std::unique_ptr<int>.

I am understanding the wording correctly? If so was this change made on=20
purpose?

--=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_586_13055401.1372185895504
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

The C++14 CD (N3690) at the paragraph $5.1.2/11, says:<br>For every init-ca=
pture a non-static data member named by the identifier of the init-capture =
is declared in<br>the closure type. This member is not a bit-field and not =
mutable. The type of that member corresponds to<br>the type of a hypothetic=
al variable declaration of the form =93auto init-capture ;=94, except that =
the variable<br>name (i.e., the identifier of the init-capture) is replaced=
 by a unique identifier.<br><br>As I understand this means that the type of=
 member <span style=3D"font-family: courier new,monospace;">x</span> declar=
ed in lambda capture as<span style=3D"font-family: courier new,monospace;">=
 [x{std::move(uniq_ptr)}] () {}</span>&nbsp;will be the same as would be fo=
r the expression <span style=3D"font-family: courier new,monospace;">auto x=
{std::move(unique_ptr)}</span>. That means that type of x would be <span st=
yle=3D"font-family: courier new,monospace;">std::initializer_list&lt;std::u=
nique_ptr&lt;int&gt;&gt;</span> (assuming that type of <span style=3D"font-=
family: courier new,monospace;">unique_ptr</span> is <span style=3D"font-fa=
mily: courier new,monospace;">std::unique_ptr&lt;int&gt;</span>). <span id=
=3D"result_box" class=3D"short_text" lang=3D"en"><span class=3D"hps">in con=
trast the <a href=3D"http://www.open-std.org/JTC1/SC22/WG21/docs/papers/201=
3/n3610.html">original prposal</a></span></span> contains of lambda example=
<span style=3D"font-family: courier new,monospace;"><code> <span style=3D"f=
ont-family: courier new,monospace;"><font size=3D"2">[ x { move(x) }, y =3D=
 transform(y, z), foo, bar, baz ] { ... },<font face=3D"arial,sans-serif"> =
which suggest that </font></font></span></code></span>type of <font face=3D=
"courier new,monospace">x</font> would be <span style=3D"font-family: couri=
er new,monospace;">std::unique_ptr&lt;int&gt;.<br><br><font face=3D"arial,s=
ans-serif">I am understanding the wording correctly? If so was this change =
made on purpose?</font><br></span>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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 />
&nbsp;<br />
&nbsp;<br />

------=_Part_586_13055401.1372185895504--

.
