Topic: Multidimentional std::initializer_list deduction


Author: NDos Dannyu <ndospark320@naver.com>
Date: Sat, 7 May 2016 16:33:32 -0700 (PDT)
Raw View
------=_Part_2295_619751627.1462664012612
Content-Type: multipart/alternative;
 boundary="----=_Part_2296_984746579.1462664012612"

------=_Part_2296_984746579.1462664012612
Content-Type: text/plain; charset=UTF-8

I noticed *std::initializer_list* can be deduced to *auto* only one rank.
*auto i = {{0}, {0, 1}};* // expected i to be
std::initializer_list<std::initializer_list<int>>
*std::vector<std::vector<int>> v{{0}, {0, 1}};* // but the list
initialization like this is legal.
So, I simply suggest *std::initializer_list* to be able to deduced to *auto*
multiple ranks.

--
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/9cd77438-d69f-4942-8c65-70cb4c0633b5%40isocpp.org.

------=_Part_2296_984746579.1462664012612
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I noticed <b>std::initializer_list</b> can be deduced=
 to <b>auto</b> only one rank.</div><div><b>auto i =3D {{0}, {0, 1}};</b> /=
/ expected i to be std::initializer_list&lt;std::initializer_list&lt;int&gt=
;&gt;</div><div><b>std::vector&lt;std::vector&lt;int&gt;&gt; v{{0}, {0, 1}}=
;</b> // but the list initialization like this is=C2=A0legal.</div><div>So,=
 I simply suggest <b>std::initializer_list</b> to be able to deduced to <b>=
auto</b> multiple ranks.</div></div>

<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/9cd77438-d69f-4942-8c65-70cb4c0633b5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9cd77438-d69f-4942-8c65-70cb4c0633b5=
%40isocpp.org</a>.<br />

------=_Part_2296_984746579.1462664012612--
------=_Part_2295_619751627.1462664012612--

.