Topic: make_array and brace-init list. Should this be a


Author: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Fri, 19 Aug 2016 05:17:42 -0700 (PDT)
Raw View
------=_Part_2665_2127873733.1471609062211
Content-Type: multipart/alternative;
 boundary="----=_Part_2666_1110654509.1471609062211"

------=_Part_2666_1110654509.1471609062211
Content-Type: text/plain; charset=UTF-8

Hello everyone,

I am trying to implement a custom version of (except for common-type) of
make_array.

I see a problem when implementing, let me drive it by example. This is my
question in stackoverflow:

http://stackoverflow.com/questions/39035147/experimental-make-array-can-i-use-brace-init-list-as-arguments?noredirect=1#comment65421562_39035147

So I can do this:

make_array<int>(1, 2, 3, 4, 5.5);

But not this:

make_array<int>({1}, {2}, {3});

So:

1. I cannot prevent narrowing conversions.
2. I cannot construct my own types from brace-init lists in template
contexts *even if I provide an explicit type argument*.

I think that should just work, look at my implementation. Are there any
workarounds to this?






--
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/dc1a301e-26a9-4eae-ba8f-e63a444348ee%40isocpp.org.

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

<div dir=3D"ltr">Hello everyone,<div><br></div><div>I am trying to implemen=
t a custom version of (except for common-type) of make_array.</div><div><br=
></div><div>I see a problem when implementing, let me drive it by example. =
This is my question in stackoverflow:</div><div><br></div><div>http://stack=
overflow.com/questions/39035147/experimental-make-array-can-i-use-brace-ini=
t-list-as-arguments?noredirect=3D1#comment65421562_39035147<br></div><div><=
br></div><div>So I can do this:</div><div><br></div><div>make_array&lt;int&=
gt;(1, 2, 3, 4, 5.5);=C2=A0</div><div><br></div><div>But not this:</div><di=
v><br></div><div>make_array&lt;int&gt;({1}, {2}, {3});</div><div><br></div>=
<div>So:</div><div><br></div><div>1. I cannot prevent narrowing conversions=
..</div><div>2. I cannot construct my own types from brace-init lists in tem=
plate contexts *even if I provide an explicit type argument*.</div><div><br=
></div><div>I think that should just work, look at my implementation. Are t=
here any workarounds to this?</div><div><br></div><div><br></div><div><br><=
/div><div><br></div><div><br></div><div><br></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/dc1a301e-26a9-4eae-ba8f-e63a444348ee%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dc1a301e-26a9-4eae-ba8f-e63a444348ee=
%40isocpp.org</a>.<br />

------=_Part_2666_1110654509.1471609062211--

------=_Part_2665_2127873733.1471609062211--

.


Author: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Fri, 19 Aug 2016 05:26:08 -0700 (PDT)
Raw View
------=_Part_2587_1824359184.1471609568115
Content-Type: multipart/alternative;
 boundary="----=_Part_2588_1032311304.1471609568116"

------=_Part_2588_1032311304.1471609568116
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I think the root of the problem is this one:

" A brace enclosed initializer list is not an expression and doesn't have=
=20
type and therefore cannot be deduced by the template."

http://stackoverflow.com/questions/24493902/brace-enclosed-initializer-list=
-of-templated-struct

El viernes, 19 de agosto de 2016, 19:17:42 (UTC+7), Germ=C3=A1n Diago escri=
bi=C3=B3:
>
> Hello everyone,
>
> I am trying to implement a custom version of (except for common-type) of=
=20
> make_array.
>
> I see a problem when implementing, let me drive it by example. This is my=
=20
> question in stackoverflow:
>
>
> http://stackoverflow.com/questions/39035147/experimental-make-array-can-i=
-use-brace-init-list-as-arguments?noredirect=3D1#comment65421562_39035147
>
> So I can do this:
>
> make_array<int>(1, 2, 3, 4, 5.5);=20
>
> But not this:
>
> make_array<int>({1}, {2}, {3});
>
> So:
>
> 1. I cannot prevent narrowing conversions.
> 2. I cannot construct my own types from brace-init lists in template=20
> contexts *even if I provide an explicit type argument*.
>
> I think that should just work, look at my implementation. Are there any=
=20
> workarounds to this?
>
>
>
>
>
>
>

--=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/9dfed2bd-eb13-40f2-a6cc-685b948e26a3%40isocpp.or=
g.

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

<div dir=3D"ltr">I think the root of the problem is this one:<div><br></div=
><div>&quot;<span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quo=
t;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px; line-height=
: 19.5px;">=C2=A0A brace enclosed initializer list is not an expression and=
 doesn&#39;t have type and therefore cannot be deduced by the template.&quo=
t;</span></div><div><font color=3D"#242729" face=3D"Arial, Helvetica Neue, =
Helvetica, sans-serif"><span style=3D"font-size: 15px; line-height: 19.5px;=
"><br></span></font></div><div><font color=3D"#242729" face=3D"Arial, Helve=
tica Neue, Helvetica, sans-serif"><span style=3D"font-size: 15px; line-heig=
ht: 19.5px;">http://stackoverflow.com/questions/24493902/brace-enclosed-ini=
tializer-list-of-templated-struct</span><br></font><br>El viernes, 19 de ag=
osto de 2016, 19:17:42 (UTC+7), Germ=C3=A1n Diago  escribi=C3=B3:<blockquot=
e class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: =
1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Hello everyone,<div><br=
></div><div>I am trying to implement a custom version of (except for common=
-type) of make_array.</div><div><br></div><div>I see a problem when impleme=
nting, let me drive it by example. This is my question in stackoverflow:</d=
iv><div><br></div><div><a href=3D"http://stackoverflow.com/questions/390351=
47/experimental-make-array-can-i-use-brace-init-list-as-arguments?noredirec=
t=3D1#comment65421562_39035147" target=3D"_blank" rel=3D"nofollow" onmoused=
own=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackov=
erflow.com%2Fquestions%2F39035147%2Fexperimental-make-array-can-i-use-brace=
-init-list-as-arguments%3Fnoredirect%3D1%23comment65421562_39035147\x26sa\x=
3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9WnNmUC_T-JgVgbieX0OdJ6XW4A&#39;;return t=
rue;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F=
%2Fstackoverflow.com%2Fquestions%2F39035147%2Fexperimental-make-array-can-i=
-use-brace-init-list-as-arguments%3Fnoredirect%3D1%23comment65421562_390351=
47\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9WnNmUC_T-JgVgbieX0OdJ6XW4A&#39=
;;return true;">http://stackoverflow.com/<wbr>questions/39035147/<wbr>exper=
imental-make-array-can-i-<wbr>use-brace-init-list-as-<wbr>arguments?noredir=
ect=3D1#<wbr>comment65421562_39035147</a><br></div><div><br></div><div>So I=
 can do this:</div><div><br></div><div>make_array&lt;int&gt;(1, 2, 3, 4, 5.=
5);=C2=A0</div><div><br></div><div>But not this:</div><div><br></div><div>m=
ake_array&lt;int&gt;({1}, {2}, {3});</div><div><br></div><div>So:</div><div=
><br></div><div>1. I cannot prevent narrowing conversions.</div><div>2. I c=
annot construct my own types from brace-init lists in template contexts *ev=
en if I provide an explicit type argument*.</div><div><br></div><div>I thin=
k that should just work, look at my implementation. Are there any workaroun=
ds to this?</div><div><br></div><div><br></div><div><br></div><div><br></di=
v><div><br></div><div><br></div></div></blockquote></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/9dfed2bd-eb13-40f2-a6cc-685b948e26a3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9dfed2bd-eb13-40f2-a6cc-685b948e26a3=
%40isocpp.org</a>.<br />

------=_Part_2588_1032311304.1471609568116--

------=_Part_2587_1824359184.1471609568115--

.


Author: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Fri, 19 Aug 2016 05:32:47 -0700 (PDT)
Raw View
------=_Part_2477_271364251.1471609967682
Content-Type: multipart/alternative;
 boundary="----=_Part_2478_834254119.1471609967683"

------=_Part_2478_834254119.1471609967683
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Ok, I see I could use an initializer_list<Val> for the argument instead of=
=20
variadic Val...

So my conclusion here is at least that make_array should do the same when=
=20
receiving explicit parameter for value_type?

One minor annoyance to this is that we need an extra {} before the=20
arguments, but still can live with that I guess.

El viernes, 19 de agosto de 2016, 19:26:08 (UTC+7), Germ=C3=A1n Diago escri=
bi=C3=B3:
>
> I think the root of the problem is this one:
>
> " A brace enclosed initializer list is not an expression and doesn't have=
=20
> type and therefore cannot be deduced by the template."
>
>
> http://stackoverflow.com/questions/24493902/brace-enclosed-initializer-li=
st-of-templated-struct
>
> El viernes, 19 de agosto de 2016, 19:17:42 (UTC+7), Germ=C3=A1n Diago esc=
ribi=C3=B3:
>>
>> Hello everyone,
>>
>> I am trying to implement a custom version of (except for common-type) of=
=20
>> make_array.
>>
>> I see a problem when implementing, let me drive it by example. This is m=
y=20
>> question in stackoverflow:
>>
>>
>> http://stackoverflow.com/questions/39035147/experimental-make-array-can-=
i-use-brace-init-list-as-arguments?noredirect=3D1#comment65421562_39035147
>>
>> So I can do this:
>>
>> make_array<int>(1, 2, 3, 4, 5.5);=20
>>
>> But not this:
>>
>> make_array<int>({1}, {2}, {3});
>>
>> So:
>>
>> 1. I cannot prevent narrowing conversions.
>> 2. I cannot construct my own types from brace-init lists in template=20
>> contexts *even if I provide an explicit type argument*.
>>
>> I think that should just work, look at my implementation. Are there any=
=20
>> workarounds to this?
>>
>>
>>
>>
>>
>>
>>

--=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/4d7c3804-51e9-446b-b2b4-5d56d151aa41%40isocpp.or=
g.

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

<div dir=3D"ltr">Ok, I see I could use an initializer_list&lt;Val&gt; for t=
he argument instead of variadic Val...<div><br></div><div>So my conclusion =
here is at least that make_array should do the same when receiving explicit=
 parameter for value_type?</div><div><br></div><div>One minor annoyance to =
this is that we need an extra {} before the arguments, but still can live w=
ith that I guess.<br><br>El viernes, 19 de agosto de 2016, 19:26:08 (UTC+7)=
, Germ=C3=A1n Diago  escribi=C3=B3:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><div dir=3D"ltr">I think the root of the problem is this one:<div><br=
></div><div>&quot;<span style=3D"color:rgb(36,39,41);font-family:Arial,&quo=
t;Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15px;line-height:19.5=
px">=C2=A0A brace enclosed initializer list is not an expression and doesn&=
#39;t have type and therefore cannot be deduced by the template.&quot;</spa=
n></div><div><font color=3D"#242729" face=3D"Arial, Helvetica Neue, Helveti=
ca, sans-serif"><span style=3D"font-size:15px;line-height:19.5px"><br></spa=
n></font></div><div><font color=3D"#242729" face=3D"Arial, Helvetica Neue, =
Helvetica, sans-serif"><span style=3D"font-size:15px;line-height:19.5px"><a=
 href=3D"http://stackoverflow.com/questions/24493902/brace-enclosed-initial=
izer-list-of-templated-struct" target=3D"_blank" rel=3D"nofollow" onmousedo=
wn=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackove=
rflow.com%2Fquestions%2F24493902%2Fbrace-enclosed-initializer-list-of-templ=
ated-struct\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEk6ykuwRlsyqgNwynHHY4wO=
489Zg&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.google.com/=
url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F24493902%2Fbrace-encl=
osed-initializer-list-of-templated-struct\x26sa\x3dD\x26sntz\x3d1\x26usg\x3=
dAFQjCNEk6ykuwRlsyqgNwynHHY4wO489Zg&#39;;return true;">http://stackoverflow=
..com/<wbr>questions/24493902/brace-<wbr>enclosed-initializer-list-of-<wbr>t=
emplated-struct</a></span><br></font><br>El viernes, 19 de agosto de 2016, =
19:17:42 (UTC+7), Germ=C3=A1n Diago  escribi=C3=B3:<blockquote class=3D"gma=
il_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div dir=3D"ltr">Hello everyone,<div><br></div><div>I am tr=
ying to implement a custom version of (except for common-type) of make_arra=
y.</div><div><br></div><div>I see a problem when implementing, let me drive=
 it by example. This is my question in stackoverflow:</div><div><br></div><=
div><a href=3D"http://stackoverflow.com/questions/39035147/experimental-mak=
e-array-can-i-use-brace-init-list-as-arguments?noredirect=3D1#comment654215=
62_39035147" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D=
&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquesti=
ons%2F39035147%2Fexperimental-make-array-can-i-use-brace-init-list-as-argum=
ents%3Fnoredirect%3D1%23comment65421562_39035147\x26sa\x3dD\x26sntz\x3d1\x2=
6usg\x3dAFQjCNH9WnNmUC_T-JgVgbieX0OdJ6XW4A&#39;;return true;" onclick=3D"th=
is.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.co=
m%2Fquestions%2F39035147%2Fexperimental-make-array-can-i-use-brace-init-lis=
t-as-arguments%3Fnoredirect%3D1%23comment65421562_39035147\x26sa\x3dD\x26sn=
tz\x3d1\x26usg\x3dAFQjCNH9WnNmUC_T-JgVgbieX0OdJ6XW4A&#39;;return true;">htt=
p://stackoverflow.com/<wbr>questions/39035147/<wbr>experimental-make-array-=
can-i-<wbr>use-brace-init-list-as-<wbr>arguments?noredirect=3D1#<wbr>commen=
t65421562_39035147</a><br></div><div><br></div><div>So I can do this:</div>=
<div><br></div><div>make_array&lt;int&gt;(1, 2, 3, 4, 5.5);=C2=A0</div><div=
><br></div><div>But not this:</div><div><br></div><div>make_array&lt;int&gt=
;({1}, {2}, {3});</div><div><br></div><div>So:</div><div><br></div><div>1. =
I cannot prevent narrowing conversions.</div><div>2. I cannot construct my =
own types from brace-init lists in template contexts *even if I provide an =
explicit type argument*.</div><div><br></div><div>I think that should just =
work, look at my implementation. Are there any workarounds to this?</div><d=
iv><br></div><div><br></div><div><br></div><div><br></div><div><br></div><d=
iv><br></div></div></blockquote></div></div></blockquote></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/4d7c3804-51e9-446b-b2b4-5d56d151aa41%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4d7c3804-51e9-446b-b2b4-5d56d151aa41=
%40isocpp.org</a>.<br />

------=_Part_2478_834254119.1471609967683--

------=_Part_2477_271364251.1471609967682--

.


Author: "S.B." <i.and.my.little.friends@gmail.com>
Date: Fri, 19 Aug 2016 08:58:15 -0700 (PDT)
Raw View
------=_Part_2696_589663138.1471622295191
Content-Type: multipart/alternative;
 boundary="----=_Part_2697_515850124.1471622295192"

------=_Part_2697_515850124.1471622295192
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I don't think it's possible to enable `make_array<int>({1}, {2}, {3})` by=
=20
only changing the implementation of `make_array`. However, it's possible to=
=20
add another overload of `to_array` to enable `to_array<int>({ {1}, {2}, {3}=
=20
})`. After all, `to_array<const int>({ {1}, {2}, {3} })` is already valid=
=20
(and returns a std::array<int,3>) using=20
std::experimental::fundamentals_v2::to_array.=20
See also=20
https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/GS3j9tc=
XnI0


On Friday, August 19, 2016 at 8:17:42 PM UTC+8, Germ=C3=A1n Diago wrote:
>
> Hello everyone,
>
> I am trying to implement a custom version of (except for common-type) of=
=20
> make_array.
>
> I see a problem when implementing, let me drive it by example. This is my=
=20
> question in stackoverflow:
>
>
> http://stackoverflow.com/questions/39035147/experimental-make-array-can-i=
-use-brace-init-list-as-arguments?noredirect=3D1#comment65421562_39035147
>
> So I can do this:
>
> make_array<int>(1, 2, 3, 4, 5.5);=20
>
> But not this:
>
> make_array<int>({1}, {2}, {3});
>
> So:
>
> 1. I cannot prevent narrowing conversions.
> 2. I cannot construct my own types from brace-init lists in template=20
> contexts *even if I provide an explicit type argument*.
>
> I think that should just work, look at my implementation. Are there any=
=20
> workarounds to this?
>
>
>
>
>
>
>

--=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/e0cbdf8b-ae94-4caa-bdeb-bc8009f3eee4%40isocpp.or=
g.

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

<div dir=3D"ltr">I don&#39;t think it&#39;s possible to enable `make_array&=
lt;int&gt;({1}, {2}, {3})` by only changing the implementation of `make_arr=
ay`. However, it&#39;s possible to add another overload of `to_array` to en=
able `to_array&lt;int&gt;({ {1}, {2}, {3} })`. After all, `to_array&lt;cons=
t int&gt;({ {1}, {2}, {3} })` is already valid (and returns a std::array&lt=
;int,3&gt;) using std::experimental::fundamentals_v2::to_array. <br>See als=
o https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/GS3j9=
tcXnI0<br><br><br>On Friday, August 19, 2016 at 8:17:42 PM UTC+8, Germ=C3=
=A1n Diago wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr">Hello everyone,<div><br></div><div>I am trying to implement a custom ve=
rsion of (except for common-type) of make_array.</div><div><br></div><div>I=
 see a problem when implementing, let me drive it by example. This is my qu=
estion in stackoverflow:</div><div><br></div><div><a href=3D"http://stackov=
erflow.com/questions/39035147/experimental-make-array-can-i-use-brace-init-=
list-as-arguments?noredirect=3D1#comment65421562_39035147" target=3D"_blank=
" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.com/ur=
l?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F39035147%2Fexperimental=
-make-array-can-i-use-brace-init-list-as-arguments%3Fnoredirect%3D1%23comme=
nt65421562_39035147\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9WnNmUC_T-JgVg=
bieX0OdJ6XW4A&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.goo=
gle.com/url?q\x3dhttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F39035147%2Fex=
perimental-make-array-can-i-use-brace-init-list-as-arguments%3Fnoredirect%3=
D1%23comment65421562_39035147\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9WnN=
mUC_T-JgVgbieX0OdJ6XW4A&#39;;return true;">http://stackoverflow.com/<wbr>qu=
estions/39035147/<wbr>experimental-make-array-can-i-<wbr>use-brace-init-lis=
t-as-<wbr>arguments?noredirect=3D1#<wbr>comment65421562_39035147</a><br></d=
iv><div><br></div><div>So I can do this:</div><div><br></div><div>make_arra=
y&lt;int&gt;(1, 2, 3, 4, 5.5);=C2=A0</div><div><br></div><div>But not this:=
</div><div><br></div><div>make_array&lt;int&gt;({1}, {2}, {3});</div><div><=
br></div><div>So:</div><div><br></div><div>1. I cannot prevent narrowing co=
nversions.</div><div>2. I cannot construct my own types from brace-init lis=
ts in template contexts *even if I provide an explicit type argument*.</div=
><div><br></div><div>I think that should just work, look at my implementati=
on. Are there any workarounds to this?</div><div><br></div><div><br></div><=
div><br></div><div><br></div><div><br></div><div><br></div></div></blockquo=
te></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/e0cbdf8b-ae94-4caa-bdeb-bc8009f3eee4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e0cbdf8b-ae94-4caa-bdeb-bc8009f3eee4=
%40isocpp.org</a>.<br />

------=_Part_2697_515850124.1471622295192--

------=_Part_2696_589663138.1471622295191--

.