Topic: In place construction in std::promise::set_value()


Author: Curious <aary@umich.edu>
Date: Thu, 2 Mar 2017 13:50:06 -0800 (PST)
Raw View
------=_Part_476_1563089639.1488491406565
Content-Type: multipart/alternative;
 boundary="----=_Part_477_993969589.1488491406565"

------=_Part_477_993969589.1488491406565
Content-Type: text/plain; charset=UTF-8

Currently there are two overloads to the set_value() method in the
std::promise class.

void set_value( const R& value );
void set_value( R&& value );

Both require one copy/move construction into the shared state.  I feel like
the class should also provide the user with the ability to construct the
value in place with a third (and possibly fourth for generality since
initializer lists are not deducible) overload

template <typename... Args>
void set_value(std::in_place_t, Args&&... args);
template <typename U, typename... Args>
void set_value(std::in_place_t, std::initializer_list<U> ilist, Args&&...)

These overloads will allow the user to construct the value they want to put
into the promise/future in place.  Which should be valuable.

--
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/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org.

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

<div dir=3D"ltr">Currently there are two overloads to the set_value() metho=
d in the std::promise class. =C2=A0<div><font face=3D"courier new, monospac=
e"><br></font></div><div><font face=3D"courier new, monospace">void set_val=
ue( const R&amp; value );<br></font></div><div><font face=3D"courier new, m=
onospace">void set_value( R&amp;&amp; value );<br></font></div><div><br></d=
iv><div>Both require one copy/move construction into the shared state. =C2=
=A0I feel like the class should also provide the user with the ability to c=
onstruct the value in place with a third (and possibly fourth for generalit=
y since initializer lists are not deducible) overload</div><div><br></div><=
div><font face=3D"courier new, monospace">template &lt;typename... Args&gt;=
</font></div><div><font face=3D"courier new, monospace">void set_value(std:=
:in_place_t, Args&amp;&amp;... args);</font></div><div><font face=3D"courie=
r new, monospace">template &lt;typename U, typename... Args&gt;</font></div=
><div><font face=3D"courier new, monospace">void set_value(std::in_place_t,=
 std::initializer_list&lt;U&gt; ilist, Args&amp;&amp;...)</font></div><div>=
<br></div><div>These overloads will allow the user to construct the value t=
hey want to put into the promise/future in place. =C2=A0Which should be val=
uable.=C2=A0</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/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c=
%40isocpp.org</a>.<br />

------=_Part_477_993969589.1488491406565--

------=_Part_476_1563089639.1488491406565--

.


Author: Patrice Roy <patricer@gmail.com>
Date: Thu, 2 Mar 2017 17:23:53 -0500
Raw View
--001a114e00be5d10ad0549c6e2cf
Content-Type: text/plain; charset=UTF-8

That was discussed yesterday in LEWG. Response was favorable but the paper
still needs some work. Author will be notified.

2017-03-02 16:50 GMT-05:00 Curious <aary@umich.edu>:

> Currently there are two overloads to the set_value() method in the
> std::promise class.
>
> void set_value( const R& value );
> void set_value( R&& value );
>
> Both require one copy/move construction into the shared state.  I feel
> like the class should also provide the user with the ability to construct
> the value in place with a third (and possibly fourth for generality since
> initializer lists are not deducible) overload
>
> template <typename... Args>
> void set_value(std::in_place_t, Args&&... args);
> template <typename U, typename... Args>
> void set_value(std::in_place_t, std::initializer_list<U> ilist, Args&&...)
>
> These overloads will allow the user to construct the value they want to
> put into the promise/future in place.  Which should be valuable.
>
> --
> 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/fc6bdee0-26d3-43a2-
> ad6b-c0659f72590c%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

--
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/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com.

--001a114e00be5d10ad0549c6e2cf
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">That was discussed yesterday in LEWG. Response was favorab=
le but the paper still needs some work. Author will be notified.<br></div><=
div class=3D"gmail_extra"><br><div class=3D"gmail_quote">2017-03-02 16:50 G=
MT-05:00 Curious <span dir=3D"ltr">&lt;<a href=3D"mailto:aary@umich.edu" ta=
rget=3D"_blank">aary@umich.edu</a>&gt;</span>:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr">Currently there are two overloads to the set_value()=
 method in the std::promise class. =C2=A0<div><font face=3D"courier new, mo=
nospace"><br></font></div><div><font face=3D"courier new, monospace">void s=
et_value( const R&amp; value );<br></font></div><div><font face=3D"courier =
new, monospace">void set_value( R&amp;&amp; value );<br></font></div><div><=
br></div><div>Both require one copy/move construction into the shared state=
..=C2=A0 I feel like the class should also provide the user with the ability=
 to construct the value in place with a third (and possibly fourth for gene=
rality since initializer lists are not deducible) overload</div><div><br></=
div><div><font face=3D"courier new, monospace">template &lt;typename... Arg=
s&gt;</font></div><div><font face=3D"courier new, monospace">void set_value=
(std::in_place_t, Args&amp;&amp;... args);</font></div><div><font face=3D"c=
ourier new, monospace">template &lt;typename U, typename... Args&gt;</font>=
</div><div><font face=3D"courier new, monospace">void set_value(std::in_pla=
ce_t, std::initializer_list&lt;U&gt; ilist, Args&amp;&amp;...)</font></div>=
<div><br></div><div>These overloads will allow the user to construct the va=
lue they want to put into the promise/future in place.=C2=A0 Which should b=
e valuable.=C2=A0</div></div><span class=3D"HOEnZb"><font color=3D"#888888"=
>

<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/fc6b=
dee0-26d3-43a2-<wbr>ad6b-c0659f72590c%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></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/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9=
qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3=
YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com</a>.<br />

--001a114e00be5d10ad0549c6e2cf--

.


Author: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Date: Thu, 02 Mar 2017 22:26:01 +0000
Raw View
--001a11425e44a0dfa10549c6ea94
Content-Type: text/plain; charset=UTF-8

FTR the paper in question (since it seems that OP hasn't seen it and came
up with the idea independently) is
http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf.

On Thu, Mar 2, 2017 at 11:23 PM Patrice Roy <patricer@gmail.com> wrote:

> That was discussed yesterday in LEWG. Response was favorable but the paper
> still needs some work. Author will be notified.
>
> 2017-03-02 16:50 GMT-05:00 Curious <aary@umich.edu>:
>
> Currently there are two overloads to the set_value() method in the
> std::promise class.
>
> void set_value( const R& value );
> void set_value( R&& value );
>
> Both require one copy/move construction into the shared state.  I feel
> like the class should also provide the user with the ability to construct
> the value in place with a third (and possibly fourth for generality since
> initializer lists are not deducible) overload
>
> template <typename... Args>
> void set_value(std::in_place_t, Args&&... args);
> template <typename U, typename... Args>
> void set_value(std::in_place_t, std::initializer_list<U> ilist, Args&&...)
>
> These overloads will allow the user to construct the value they want to
> put into the promise/future in place.  Which should be valuable.
>
> --
> 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/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>
>
> --
> 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/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAPCFJdQJYxVN2v4btekmuOa0Re6iGqZb%3D%3DXkE8jHHtgBW5htAA%40mail.gmail.com.

--001a11425e44a0dfa10549c6ea94
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">FTR the paper in question (since it seems that OP hasn&#39=
;t seen it and came up with the idea independently) is=C2=A0<a href=3D"http=
://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf">http://open-st=
d.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf</a>.</div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr">On Thu, Mar 2, 2017 at 11:23 PM Patrice R=
oy &lt;<a href=3D"mailto:patricer@gmail.com">patricer@gmail.com</a>&gt; wro=
te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr" class=3D"gmail=
_msg">That was discussed yesterday in LEWG. Response was favorable but the =
paper still needs some work. Author will be notified.<br class=3D"gmail_msg=
"></div><div class=3D"gmail_extra gmail_msg"><br class=3D"gmail_msg"><div c=
lass=3D"gmail_quote gmail_msg">2017-03-02 16:50 GMT-05:00 Curious <span dir=
=3D"ltr" class=3D"gmail_msg">&lt;<a href=3D"mailto:aary@umich.edu" class=3D=
"gmail_msg" target=3D"_blank">aary@umich.edu</a>&gt;</span>:<br class=3D"gm=
ail_msg"><blockquote class=3D"gmail_quote gmail_msg" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr" class=3D=
"gmail_msg">Currently there are two overloads to the set_value() method in =
the std::promise class. =C2=A0<div class=3D"gmail_msg"><font face=3D"courie=
r new, monospace" class=3D"gmail_msg"><br class=3D"gmail_msg"></font></div>=
<div class=3D"gmail_msg"><font face=3D"courier new, monospace" class=3D"gma=
il_msg">void set_value( const R&amp; value );<br class=3D"gmail_msg"></font=
></div><div class=3D"gmail_msg"><font face=3D"courier new, monospace" class=
=3D"gmail_msg">void set_value( R&amp;&amp; value );<br class=3D"gmail_msg">=
</font></div><div class=3D"gmail_msg"><br class=3D"gmail_msg"></div><div cl=
ass=3D"gmail_msg">Both require one copy/move construction into the shared s=
tate.=C2=A0 I feel like the class should also provide the user with the abi=
lity to construct the value in place with a third (and possibly fourth for =
generality since initializer lists are not deducible) overload</div><div cl=
ass=3D"gmail_msg"><br class=3D"gmail_msg"></div><div class=3D"gmail_msg"><f=
ont face=3D"courier new, monospace" class=3D"gmail_msg">template &lt;typena=
me... Args&gt;</font></div><div class=3D"gmail_msg"><font face=3D"courier n=
ew, monospace" class=3D"gmail_msg">void set_value(std::in_place_t, Args&amp=
;&amp;... args);</font></div><div class=3D"gmail_msg"><font face=3D"courier=
 new, monospace" class=3D"gmail_msg">template &lt;typename U, typename... A=
rgs&gt;</font></div><div class=3D"gmail_msg"><font face=3D"courier new, mon=
ospace" class=3D"gmail_msg">void set_value(std::in_place_t, std::initialize=
r_list&lt;U&gt; ilist, Args&amp;&amp;...)</font></div><div class=3D"gmail_m=
sg"><br class=3D"gmail_msg"></div><div class=3D"gmail_msg">These overloads =
will allow the user to construct the value they want to put into the promis=
e/future in place.=C2=A0 Which should be valuable.=C2=A0</div></div><span c=
lass=3D"m_-8413224776974053175HOEnZb gmail_msg"><font color=3D"#888888" cla=
ss=3D"gmail_msg">

<p class=3D"gmail_msg"></p>

-- <br class=3D"gmail_msg">
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br class=3D"gmail_msg=
">
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" class=3D"gm=
ail_msg" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br cla=
ss=3D"gmail_msg">
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" class=3D"gmail_msg" target=3D"_blank">std-proposals@isocpp.org</a>.<b=
r class=3D"gmail_msg">
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" class=3D"gmail_msg=
" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-prop=
osals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org</a>.<br class=3D"gm=
ail_msg">
</font></span></blockquote></div><br class=3D"gmail_msg"></div>

<p class=3D"gmail_msg"></p>

-- <br class=3D"gmail_msg">
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br class=3D"gmail_msg=
">
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" class=3D"gm=
ail_msg" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br cla=
ss=3D"gmail_msg">
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" class=3D"gmail_msg" target=3D"_blank">std-proposals@isocpp.org</a>.<b=
r class=3D"gmail_msg">
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9=
qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter"=
 class=3D"gmail_msg" target=3D"_blank">https://groups.google.com/a/isocpp.o=
rg/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1H=
w%40mail.gmail.com</a>.<br class=3D"gmail_msg">
</blockquote></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/CAPCFJdQJYxVN2v4btekmuOa0Re6iGqZb%3D%=
3DXkE8jHHtgBW5htAA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdQJYxVN=
2v4btekmuOa0Re6iGqZb%3D%3DXkE8jHHtgBW5htAA%40mail.gmail.com</a>.<br />

--001a11425e44a0dfa10549c6ea94--

.


Author: aary@umich.edu
Date: Thu, 2 Mar 2017 14:32:54 -0800 (PST)
Raw View
------=_Part_491_1904621666.1488493974079
Content-Type: multipart/alternative;
 boundary="----=_Part_492_805664850.1488493974079"

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

I feel like it would be better (as far as what I would like to see in the=
=20
C++ standard library) to include an extra overload in the std::promise=20
class with an std::in_place_t parameter rather than an empty body (as the=
=20
paper suggests) so, the following=20

template <typename... Args>
void set_value(std::in_place_t, Args&&... args);
template <typename U, typename... Args>
void set_value(std::in_place_t, std::initializer_list<U> ilist, Args&&...)

instead of

template <typename... Args>
void set_value(Args&&... args);
template <typename... Args>
void set_value(std::initializer_list<U> ilist, Args&&...)

Is there any way I can suggest changes to the paper?

While an emplace function would be in line with the naming traditions of=20
the older containers like std::vector::emplace_back, the newer ones like=20
std::optional have an std::in_place_t parameter which conveys the=20
implementation and effects to the user better.=20

On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=82 Dominiak wrote:
>
> FTR the paper in question (since it seems that OP hasn't seen it and came=
=20
> up with the idea independently) is=20
> http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf.
>
> On Thu, Mar 2, 2017 at 11:23 PM Patrice Roy <patr...@gmail.com=20
> <javascript:>> wrote:
>
>> That was discussed yesterday in LEWG. Response was favorable but the=20
>> paper still needs some work. Author will be notified.
>>
>> 2017-03-02 16:50 GMT-05:00 Curious <aa...@umich.edu <javascript:>>:
>>
>>> Currently there are two overloads to the set_value() method in the=20
>>> std::promise class. =20
>>>
>>> void set_value( const R& value );
>>> void set_value( R&& value );
>>>
>>> Both require one copy/move construction into the shared state.  I feel=
=20
>>> like the class should also provide the user with the ability to constru=
ct=20
>>> the value in place with a third (and possibly fourth for generality sin=
ce=20
>>> initializer lists are not deducible) overload
>>>
>>> template <typename... Args>
>>> void set_value(std::in_place_t, Args&&... args);
>>> template <typename U, typename... Args>
>>> void set_value(std::in_place_t, std::initializer_list<U> ilist,=20
>>> Args&&...)
>>>
>>> These overloads will allow the user to construct the value they want to=
=20
>>> put into the promise/future in place.  Which should be valuable.=20
>>>
>>> --=20
>>> You received this message because you are subscribed to the Google=20
>>> Groups "ISO C++ Standard - Future Proposals" group.
>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>> an email to std-proposal...@isocpp.org <javascript:>.
>>> To post to this group, send email to std-pr...@isocpp.org <javascript:>=
..
>>> To view this discussion on the web visit=20
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-2=
6d3-43a2-ad6b-c0659f72590c%40isocpp.org=20
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-=
26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGu=
d-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gG=
ud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Dema=
il&utm_source=3Dfooter>
>> .
>>
>

--=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/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%40isocpp.or=
g.

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

<div dir=3D"ltr">I feel like it would be better (as far as what I would lik=
e to see in the C++ standard library) to include an extra overload in the s=
td::promise class with an <font face=3D"courier new, monospace">std::in_pla=
ce_t</font> parameter rather than an empty body (as the paper suggests) so,=
 the following=C2=A0<div><br></div><div><div><font face=3D"courier new, mon=
ospace">template &lt;typename... Args&gt;</font></div><div><font face=3D"co=
urier new, monospace">void set_value(std::in_place_t, Args&amp;&amp;... arg=
s);</font></div><div><font face=3D"courier new, monospace">template &lt;typ=
ename U, typename... Args&gt;</font></div><div><font face=3D"courier new, m=
onospace">void set_value(std::in_place_t, std::initializer_list&lt;U&gt; il=
ist, Args&amp;&amp;...)</font></div><div><font face=3D"courier new, monospa=
ce"><br></font></div><div><font face=3D"arial, sans-serif">instead of</font=
></div><div><font face=3D"arial, sans-serif"><br></font></div><div><div><fo=
nt face=3D"courier new, monospace">template &lt;typename... Args&gt;</font>=
</div><div><font face=3D"courier new, monospace">void set_value(Args&amp;&a=
mp;... args);</font></div><div><font face=3D"courier new, monospace">templa=
te &lt;typename... Args&gt;</font></div><div><font face=3D"courier new, mon=
ospace">void set_value(std::initializer_list&lt;U&gt; ilist, Args&amp;&amp;=
....)</font></div></div><br>Is there any way I can suggest changes to the pa=
per?</div><div><br></div><div>While an <font face=3D"courier new, monospace=
">emplace</font> function would be in line with the naming traditions of th=
e older containers like <font face=3D"courier new, monospace">std::vector::=
emplace_back</font>, the newer ones like std::optional have an <font face=
=3D"courier new, monospace">std::in_place_t</font> parameter which conveys =
the implementation and effects to the user better.=C2=A0</div><div><br></di=
v><div>On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=82 Dominiak=
 wrote:<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">FTR th=
e paper in question (since it seems that OP hasn&#39;t seen it and came up =
with the idea independently) is=C2=A0<a href=3D"http://open-std.org/JTC1/SC=
22/WG21/docs/papers/2016/p0319r0.pdf" target=3D"_blank" rel=3D"nofollow" on=
mousedown=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fo=
pen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0319r0.pdf\x26sa=
\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3i09hW6fFaBBZOTpW6MnsKGB_0g&#39;;return=
 true;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%=
2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fp0319r0.pdf=
\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3i09hW6fFaBBZOTpW6MnsKGB_0g&#39;;=
return true;">http://open-std.org/JTC1/<wbr>SC22/WG21/docs/papers/2016/<wbr=
>p0319r0.pdf</a>.</div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On T=
hu, Mar 2, 2017 at 11:23 PM Patrice Roy &lt;<a href=3D"javascript:" target=
=3D"_blank" gdf-obfuscated-mailto=3D"jE7qAYcYCgAJ" rel=3D"nofollow" onmouse=
down=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.hre=
f=3D&#39;javascript:&#39;;return true;">patr...@gmail.com</a>&gt; wrote:<br=
></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">That was discussed y=
esterday in LEWG. Response was favorable but the paper still needs some wor=
k. Author will be notified.<br></div><div><br><div class=3D"gmail_quote">20=
17-03-02 16:50 GMT-05:00 Curious <span dir=3D"ltr">&lt;<a href=3D"javascrip=
t:" target=3D"_blank" gdf-obfuscated-mailto=3D"jE7qAYcYCgAJ" rel=3D"nofollo=
w" onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=
=3D"this.href=3D&#39;javascript:&#39;;return true;">aa...@umich.edu</a>&gt;=
</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Currently there=
 are two overloads to the set_value() method in the std::promise class. =C2=
=A0<div><font face=3D"courier new, monospace"><br></font></div><div><font f=
ace=3D"courier new, monospace">void set_value( const R&amp; value );<br></f=
ont></div><div><font face=3D"courier new, monospace">void set_value( R&amp;=
&amp; value );<br></font></div><div><br></div><div>Both require one copy/mo=
ve construction into the shared state.=C2=A0 I feel like the class should a=
lso provide the user with the ability to construct the value in place with =
a third (and possibly fourth for generality since initializer lists are not=
 deducible) overload</div><div><br></div><div><font face=3D"courier new, mo=
nospace">template &lt;typename... Args&gt;</font></div><div><font face=3D"c=
ourier new, monospace">void set_value(std::in_place_t, Args&amp;&amp;... ar=
gs);</font></div><div><font face=3D"courier new, monospace">template &lt;ty=
pename U, typename... Args&gt;</font></div><div><font face=3D"courier new, =
monospace">void set_value(std::in_place_t, std::initializer_list&lt;U&gt; i=
list, Args&amp;&amp;...)</font></div><div><br></div><div>These overloads wi=
ll allow the user to construct the value they want to put into the promise/=
future in place.=C2=A0 Which should be valuable.=C2=A0</div></div><span><fo=
nt color=3D"#888888">

<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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
jE7qAYcYCgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"jE7qAYcYCgAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/fc6bdee0-26d3-43a2-<wbr>ad6b-=
c0659f72590c%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
jE7qAYcYCgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"jE7qAYcYCgAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9=
qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter"=
 target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https:/=
/groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXA=
GQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium\x3demail\x26utm_=
source\x3dfooter&#39;;return true;" onclick=3D"this.href=3D&#39;https://gro=
ups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5r=
G9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium\x3demail\x26utm_sour=
ce\x3dfooter&#39;;return true;">https://groups.google.com/a/<wbr>isocpp.org=
/d/msgid/std-<wbr>proposals/CAKiZDp3gGud-<wbr>OCu3YxXAGQ5rG9bLEYD6k5t9qg6JV=
d<wbr>eX_2U1Hw%40mail.gmail.com</a>.<br>
</blockquote></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/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/804a1e90-7f9d-4c04-a9c3-997d6bb852a6=
%40isocpp.org</a>.<br />

------=_Part_492_805664850.1488493974079--

------=_Part_491_1904621666.1488493974079--

.


Author: Patrice Roy <patricer@gmail.com>
Date: Thu, 2 Mar 2017 17:35:30 -0500
Raw View
--94eb2c1b0f74f1038f0549c70b66
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

You should contact the OP; I'm sure Vicente will be open for ideas and
discussion. And should you both not reach an agreement, competing proposals
are fine too.

2017-03-02 17:32 GMT-05:00 <aary@umich.edu>:

> I feel like it would be better (as far as what I would like to see in the
> C++ standard library) to include an extra overload in the std::promise
> class with an std::in_place_t parameter rather than an empty body (as the
> paper suggests) so, the following
>
> template <typename... Args>
> void set_value(std::in_place_t, Args&&... args);
> template <typename U, typename... Args>
> void set_value(std::in_place_t, std::initializer_list<U> ilist, Args&&...=
)
>
> instead of
>
> template <typename... Args>
> void set_value(Args&&... args);
> template <typename... Args>
> void set_value(std::initializer_list<U> ilist, Args&&...)
>
> Is there any way I can suggest changes to the paper?
>
> While an emplace function would be in line with the naming traditions of
> the older containers like std::vector::emplace_back, the newer ones like
> std::optional have an std::in_place_t parameter which conveys the
> implementation and effects to the user better.
>
> On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=82 Dominiak wrot=
e:
>>
>> FTR the paper in question (since it seems that OP hasn't seen it and cam=
e
>> up with the idea independently) is http://open-std.org/JTC1/SC
>> 22/WG21/docs/papers/2016/p0319r0.pdf.
>>
>> On Thu, Mar 2, 2017 at 11:23 PM Patrice Roy <patr...@gmail.com> wrote:
>>
>>> That was discussed yesterday in LEWG. Response was favorable but the
>>> paper still needs some work. Author will be notified.
>>>
>>> 2017-03-02 16:50 GMT-05:00 Curious <aa...@umich.edu>:
>>>
>>>> Currently there are two overloads to the set_value() method in the
>>>> std::promise class.
>>>>
>>>> void set_value( const R& value );
>>>> void set_value( R&& value );
>>>>
>>>> Both require one copy/move construction into the shared state.  I feel
>>>> like the class should also provide the user with the ability to constr=
uct
>>>> the value in place with a third (and possibly fourth for generality si=
nce
>>>> initializer lists are not deducible) overload
>>>>
>>>> template <typename... Args>
>>>> void set_value(std::in_place_t, Args&&... args);
>>>> template <typename U, typename... Args>
>>>> void set_value(std::in_place_t, std::initializer_list<U> ilist,
>>>> Args&&...)
>>>>
>>>> These overloads will allow the user to construct the value they want t=
o
>>>> put into the promise/future in place.  Which should be valuable.
>>>>
>>>> --
>>>> 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-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit https://groups.google.com/a/i=
s
>>>> ocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-
>>>> c0659f72590c%40isocpp.org
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0=
-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>>
>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit https://groups.google.com/a/is
>>> ocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bL
>>> EYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3g=
Gud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Dem=
ail&utm_source=3Dfooter>
>>> .
>>>
>> --
> 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/804a1e90-7f9d-4c04-
> a9c3-997d6bb852a6%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/804a1e90-7f=
9d-4c04-a9c3-997d6bb852a6%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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/CAKiZDp02ZaVNUDZYzhJiJ6-rvcmbirGRUZ_8k4xBLQX2mmD=
7BQ%40mail.gmail.com.

--94eb2c1b0f74f1038f0549c70b66
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">You should contact the OP; I&#39;m sure Vicente will be op=
en for ideas and discussion. And should you both not reach an agreement, co=
mpeting proposals are fine too.<br></div><div class=3D"gmail_extra"><br><di=
v class=3D"gmail_quote">2017-03-02 17:32 GMT-05:00  <span dir=3D"ltr">&lt;<=
a href=3D"mailto:aary@umich.edu" target=3D"_blank">aary@umich.edu</a>&gt;</=
span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I feel like it wo=
uld be better (as far as what I would like to see in the C++ standard libra=
ry) to include an extra overload in the std::promise class with an <font fa=
ce=3D"courier new, monospace">std::in_place_t</font> parameter rather than =
an empty body (as the paper suggests) so, the following=C2=A0<div><br></div=
><div><span class=3D""><div><font face=3D"courier new, monospace">template =
&lt;typename... Args&gt;</font></div><div><font face=3D"courier new, monosp=
ace">void set_value(std::in_place_t, Args&amp;&amp;... args);</font></div><=
div><font face=3D"courier new, monospace">template &lt;typename U, typename=
.... Args&gt;</font></div><div><font face=3D"courier new, monospace">void se=
t_value(std::in_place_t, std::initializer_list&lt;U&gt; ilist, Args&amp;&am=
p;...)</font></div><div><font face=3D"courier new, monospace"><br></font></=
div></span><div><font face=3D"arial, sans-serif">instead of</font></div><di=
v><font face=3D"arial, sans-serif"><br></font></div><div><div><font face=3D=
"courier new, monospace">template &lt;typename... Args&gt;</font></div><div=
><font face=3D"courier new, monospace">void set_value(Args&amp;&amp;... arg=
s);</font></div><div><font face=3D"courier new, monospace">template &lt;typ=
ename... Args&gt;</font></div><div><font face=3D"courier new, monospace">vo=
id set_value(std::initializer_<wbr>list&lt;U&gt; ilist, Args&amp;&amp;...)<=
/font></div></div><br>Is there any way I can suggest changes to the paper?<=
/div><div><br></div><div>While an <font face=3D"courier new, monospace">emp=
lace</font> function would be in line with the naming traditions of the old=
er containers like <font face=3D"courier new, monospace">std::vector::empla=
ce_back</font>, the newer ones like std::optional have an <font face=3D"cou=
rier new, monospace">std::in_place_t</font> parameter which conveys the imp=
lementation and effects to the user better.=C2=A0</div><div><br></div><div>=
<span class=3D"">On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=
=82 Dominiak wrote:</span><blockquote class=3D"gmail_quote" style=3D"margin=
:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><span cla=
ss=3D""><div dir=3D"ltr">FTR the paper in question (since it seems that OP =
hasn&#39;t seen it and came up with the idea independently) is=C2=A0<a href=
=3D"http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf" rel=3D=
"nofollow" target=3D"_blank">http://open-std.org/JTC1/SC<wbr>22/WG21/docs/p=
apers/2016/p0319<wbr>r0.pdf</a>.</div><br></span><div class=3D"gmail_quote"=
><span class=3D""><div dir=3D"ltr">On Thu, Mar 2, 2017 at 11:23 PM Patrice =
Roy &lt;<a rel=3D"nofollow">patr...@gmail.com</a>&gt; wrote:<br></div></spa=
n><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><span class=3D""><div dir=3D"ltr">That was=
 discussed yesterday in LEWG. Response was favorable but the paper still ne=
eds some work. Author will be notified.<br></div></span><div><br><div class=
=3D"gmail_quote"><span class=3D"">2017-03-02 16:50 GMT-05:00 Curious <span =
dir=3D"ltr">&lt;<a rel=3D"nofollow">aa...@umich.edu</a>&gt;</span>:<br></sp=
an><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex"><span class=3D""><div dir=3D"ltr">Current=
ly there are two overloads to the set_value() method in the std::promise cl=
ass. =C2=A0<div><font face=3D"courier new, monospace"><br></font></div><div=
><font face=3D"courier new, monospace">void set_value( const R&amp; value )=
;<br></font></div><div><font face=3D"courier new, monospace">void set_value=
( R&amp;&amp; value );<br></font></div><div><br></div><div>Both require one=
 copy/move construction into the shared state.=C2=A0 I feel like the class =
should also provide the user with the ability to construct the value in pla=
ce with a third (and possibly fourth for generality since initializer lists=
 are not deducible) overload</div><div><br></div><div><font face=3D"courier=
 new, monospace">template &lt;typename... Args&gt;</font></div><div><font f=
ace=3D"courier new, monospace">void set_value(std::in_place_t, Args&amp;&am=
p;... args);</font></div><div><font face=3D"courier new, monospace">templat=
e &lt;typename U, typename... Args&gt;</font></div><div><font face=3D"couri=
er new, monospace">void set_value(std::in_place_t, std::initializer_list&lt=
;U&gt; ilist, Args&amp;&amp;...)</font></div><div><br></div><div>These over=
loads will allow the user to construct the value they want to put into the =
promise/future in place.=C2=A0 Which should be valuable.=C2=A0</div></div><=
/span><span><font color=3D"#888888"><span class=3D"">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span class=3D""><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/std-pr=
oposals<wbr>/fc6bdee0-26d3-43a2-ad6b-<wbr>c0659f72590c%40isocpp.org</a>.<br=
>
</span></font></span></blockquote></div><br></div><span class=3D"">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span class=3D""><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9=
qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter"=
 rel=3D"nofollow" target=3D"_blank">https://groups.google.com/a/is<wbr>ocpp=
..org/d/msgid/std-proposals<wbr>/CAKiZDp3gGud-OCu3YxXAGQ5rG9bL<wbr>EYD6k5t9q=
g6JVdeX_2U1Hw%40mail.<wbr>gmail.com</a>.<br>
</span></blockquote></div>
</blockquote></div></div><span class=3D"">

<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/804a=
1e90-7f9d-4c04-<wbr>a9c3-997d6bb852a6%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></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/CAKiZDp02ZaVNUDZYzhJiJ6-rvcmbirGRUZ_8=
k4xBLQX2mmD7BQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp02ZaVNUDZY=
zhJiJ6-rvcmbirGRUZ_8k4xBLQX2mmD7BQ%40mail.gmail.com</a>.<br />

--94eb2c1b0f74f1038f0549c70b66--

.


Author: Curious <aary@umich.edu>
Date: Thu, 2 Mar 2017 14:40:07 -0800 (PST)
Raw View
------=_Part_487_1429302533.1488494407057
Content-Type: multipart/alternative;
 boundary="----=_Part_488_1166180920.1488494407058"

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

Thanks!  I will contact the author via the email as stated in the paper,=20
would you recommend an email subject?  I am not aware of the protocols=20
regarding the standard library.=20

On Thursday, March 2, 2017 at 5:35:33 PM UTC-5, Patrice Roy wrote:
>
> You should contact the OP; I'm sure Vicente will be open for ideas and=20
> discussion. And should you both not reach an agreement, competing proposa=
ls=20
> are fine too.
>
> 2017-03-02 17:32 GMT-05:00 <aa...@umich.edu <javascript:>>:
>
>> I feel like it would be better (as far as what I would like to see in th=
e=20
>> C++ standard library) to include an extra overload in the std::promise=
=20
>> class with an std::in_place_t parameter rather than an empty body (as=20
>> the paper suggests) so, the following=20
>>
>> template <typename... Args>
>> void set_value(std::in_place_t, Args&&... args);
>> template <typename U, typename... Args>
>> void set_value(std::in_place_t, std::initializer_list<U> ilist, Args&&..=
..)
>>
>> instead of
>>
>> template <typename... Args>
>> void set_value(Args&&... args);
>> template <typename... Args>
>> void set_value(std::initializer_list<U> ilist, Args&&...)
>>
>> Is there any way I can suggest changes to the paper?
>>
>> While an emplace function would be in line with the naming traditions of=
=20
>> the older containers like std::vector::emplace_back, the newer ones like=
=20
>> std::optional have an std::in_place_t parameter which conveys the=20
>> implementation and effects to the user better.=20
>>
>> On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=82 Dominiak wro=
te:
>>>
>>> FTR the paper in question (since it seems that OP hasn't seen it and=20
>>> came up with the idea independently) is=20
>>> http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf.
>>>
>>> On Thu, Mar 2, 2017 at 11:23 PM Patrice Roy <patr...@gmail.com> wrote:
>>>
>>>> That was discussed yesterday in LEWG. Response was favorable but the=
=20
>>>> paper still needs some work. Author will be notified.
>>>>
>>>> 2017-03-02 16:50 GMT-05:00 Curious <aa...@umich.edu>:
>>>>
>>>>> Currently there are two overloads to the set_value() method in the=20
>>>>> std::promise class. =20
>>>>>
>>>>> void set_value( const R& value );
>>>>> void set_value( R&& value );
>>>>>
>>>>> Both require one copy/move construction into the shared state.  I fee=
l=20
>>>>> like the class should also provide the user with the ability to const=
ruct=20
>>>>> the value in place with a third (and possibly fourth for generality s=
ince=20
>>>>> initializer lists are not deducible) overload
>>>>>
>>>>> template <typename... Args>
>>>>> void set_value(std::in_place_t, Args&&... args);
>>>>> template <typename U, typename... Args>
>>>>> void set_value(std::in_place_t, std::initializer_list<U> ilist,=20
>>>>> Args&&...)
>>>>>
>>>>> These overloads will allow the user to construct the value they want=
=20
>>>>> to put into the promise/future in place.  Which should be valuable.=
=20
>>>>>
>>>>> --=20
>>>>> You received this message because you are subscribed to the Google=20
>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, sen=
d=20
>>>>> an email to std-proposal...@isocpp.org.
>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>> To view this discussion on the web visit=20
>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee0=
-26d3-43a2-ad6b-c0659f72590c%40isocpp.org=20
>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bdee=
0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium=3Demail&utm_source=3D=
footer>
>>>>> .
>>>>>
>>>>
>>>> --=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit=20
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3g=
Gud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com=20
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3=
gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3De=
mail&utm_source=3Dfooter>
>>>> .
>>>>
>>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/804a1e90-7f=
9d-4c04-a9c3-997d6bb852a6%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/804a1e90-7=
f9d-4c04-a9c3-997d6bb852a6%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
>

--=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/2895933c-9ed0-47b3-b76d-b3d793f13e23%40isocpp.or=
g.

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

<div dir=3D"ltr">Thanks! =C2=A0I will contact the author via the email as s=
tated in the paper, would you recommend an email subject? =C2=A0I am not aw=
are of the protocols regarding the standard library.=C2=A0<br><br>On Thursd=
ay, March 2, 2017 at 5:35:33 PM UTC-5, Patrice Roy wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr">You should contact the OP; I&#=
39;m sure Vicente will be open for ideas and discussion. And should you bot=
h not reach an agreement, competing proposals are fine too.<br></div><div><=
br><div class=3D"gmail_quote">2017-03-02 17:32 GMT-05:00  <span dir=3D"ltr"=
>&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"P6u=
mJQkZCgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39=
;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;">=
aa...@umich.edu</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr">I feel like it would be better (as far as what I would like to see=
 in the C++ standard library) to include an extra overload in the std::prom=
ise class with an <font face=3D"courier new, monospace">std::in_place_t</fo=
nt> parameter rather than an empty body (as the paper suggests) so, the fol=
lowing=C2=A0<div><br></div><div><span><div><font face=3D"courier new, monos=
pace">template &lt;typename... Args&gt;</font></div><div><font face=3D"cour=
ier new, monospace">void set_value(std::in_place_t, Args&amp;&amp;... args)=
;</font></div><div><font face=3D"courier new, monospace">template &lt;typen=
ame U, typename... Args&gt;</font></div><div><font face=3D"courier new, mon=
ospace">void set_value(std::in_place_t, std::initializer_list&lt;U&gt; ilis=
t, Args&amp;&amp;...)</font></div><div><font face=3D"courier new, monospace=
"><br></font></div></span><div><font face=3D"arial, sans-serif">instead of<=
/font></div><div><font face=3D"arial, sans-serif"><br></font></div><div><di=
v><font face=3D"courier new, monospace">template &lt;typename... Args&gt;</=
font></div><div><font face=3D"courier new, monospace">void set_value(Args&a=
mp;&amp;... args);</font></div><div><font face=3D"courier new, monospace">t=
emplate &lt;typename... Args&gt;</font></div><div><font face=3D"courier new=
, monospace">void set_value(std::initializer_<wbr>list&lt;U&gt; ilist, Args=
&amp;&amp;...)</font></div></div><br>Is there any way I can suggest changes=
 to the paper?</div><div><br></div><div>While an <font face=3D"courier new,=
 monospace">emplace</font> function would be in line with the naming tradit=
ions of the older containers like <font face=3D"courier new, monospace">std=
::vector::emplace_back</font>, the newer ones like std::optional have an <f=
ont face=3D"courier new, monospace">std::in_place_t</font> parameter which =
conveys the implementation and effects to the user better.=C2=A0</div><div>=
<br></div><div><span>On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=
=C5=82 Dominiak wrote:</span><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><span>=
<div dir=3D"ltr">FTR the paper in question (since it seems that OP hasn&#39=
;t seen it and came up with the idea independently) is=C2=A0<a href=3D"http=
://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0319r0.pdf" rel=3D"nofollo=
w" target=3D"_blank" onmousedown=3D"this.href=3D&#39;http://www.google.com/=
url?q\x3dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2=
016%2Fp0319r0.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3i09hW6fFaBBZOTp=
W6MnsKGB_0g&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.googl=
e.com/url?q\x3dhttp%3A%2F%2Fopen-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpape=
rs%2F2016%2Fp0319r0.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3i09hW6fFa=
BBZOTpW6MnsKGB_0g&#39;;return true;">http://open-std.org/JTC1/<wbr>SC22/WG2=
1/docs/papers/2016/<wbr>p0319r0.pdf</a>.</div><br></span><div class=3D"gmai=
l_quote"><span><div dir=3D"ltr">On Thu, Mar 2, 2017 at 11:23 PM Patrice Roy=
 &lt;<a rel=3D"nofollow">patr...@gmail.com</a>&gt; wrote:<br></div></span><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex"><span><div dir=3D"ltr">That was discussed yes=
terday in LEWG. Response was favorable but the paper still needs some work.=
 Author will be notified.<br></div></span><div><br><div class=3D"gmail_quot=
e"><span>2017-03-02 16:50 GMT-05:00 Curious <span dir=3D"ltr">&lt;<a rel=3D=
"nofollow">aa...@umich.edu</a>&gt;</span>:<br></span><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><span><div dir=3D"ltr">Currently there are two overloads to the se=
t_value() method in the std::promise class. =C2=A0<div><font face=3D"courie=
r new, monospace"><br></font></div><div><font face=3D"courier new, monospac=
e">void set_value( const R&amp; value );<br></font></div><div><font face=3D=
"courier new, monospace">void set_value( R&amp;&amp; value );<br></font></d=
iv><div><br></div><div>Both require one copy/move construction into the sha=
red state.=C2=A0 I feel like the class should also provide the user with th=
e ability to construct the value in place with a third (and possibly fourth=
 for generality since initializer lists are not deducible) overload</div><d=
iv><br></div><div><font face=3D"courier new, monospace">template &lt;typena=
me... Args&gt;</font></div><div><font face=3D"courier new, monospace">void =
set_value(std::in_place_t, Args&amp;&amp;... args);</font></div><div><font =
face=3D"courier new, monospace">template &lt;typename U, typename... Args&g=
t;</font></div><div><font face=3D"courier new, monospace">void set_value(st=
d::in_place_t, std::initializer_list&lt;U&gt; ilist, Args&amp;&amp;...)</fo=
nt></div><div><br></div><div>These overloads will allow the user to constru=
ct the value they want to put into the promise/future in place.=C2=A0 Which=
 should be valuable.=C2=A0</div></div></span><span><font color=3D"#888888">=
<span>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/fc6bdee0-26d3-43a2-<wbr>ad6b-=
c0659f72590c%40isocpp.org</a><wbr>.<br>
</span></font></span></blockquote></div><br></div><span>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9=
qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter"=
 rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D&#39;https:/=
/groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXA=
GQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium\x3demail\x26utm_=
source\x3dfooter&#39;;return true;" onclick=3D"this.href=3D&#39;https://gro=
ups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5r=
G9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium\x3demail\x26utm_sour=
ce\x3dfooter&#39;;return true;">https://groups.google.com/a/<wbr>isocpp.org=
/d/msgid/std-<wbr>proposals/CAKiZDp3gGud-<wbr>OCu3YxXAGQ5rG9bLEYD6k5t9qg6JV=
d<wbr>eX_2U1Hw%40mail.gmail.com</a>.<br>
</span></blockquote></div>
</blockquote></div></div><span>

<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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
P6umJQkZCgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"P6umJQkZCgAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/804a1e90-7f9d-4c04-<wbr>a9c3-=
997d6bb852a6%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div>
</blockquote></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/2895933c-9ed0-47b3-b76d-b3d793f13e23%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2895933c-9ed0-47b3-b76d-b3d793f13e23=
%40isocpp.org</a>.<br />

------=_Part_488_1166180920.1488494407058--

------=_Part_487_1429302533.1488494407057--

.


Author: Patrice Roy <patricer@gmail.com>
Date: Thu, 2 Mar 2017 17:48:05 -0500
Raw View
--94eb2c1909e2e6758a0549c73805
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Just indicate the paper number for reference (and the title to make things
simpler for him), I'm sure it will work out

2017-03-02 17:40 GMT-05:00 Curious <aary@umich.edu>:

> Thanks!  I will contact the author via the email as stated in the paper,
> would you recommend an email subject?  I am not aware of the protocols
> regarding the standard library.
>
> On Thursday, March 2, 2017 at 5:35:33 PM UTC-5, Patrice Roy wrote:
>>
>> You should contact the OP; I'm sure Vicente will be open for ideas and
>> discussion. And should you both not reach an agreement, competing propos=
als
>> are fine too.
>>
>> 2017-03-02 17:32 GMT-05:00 <aa...@umich.edu>:
>>
>>> I feel like it would be better (as far as what I would like to see in
>>> the C++ standard library) to include an extra overload in the std::prom=
ise
>>> class with an std::in_place_t parameter rather than an empty body (as
>>> the paper suggests) so, the following
>>>
>>> template <typename... Args>
>>> void set_value(std::in_place_t, Args&&... args);
>>> template <typename U, typename... Args>
>>> void set_value(std::in_place_t, std::initializer_list<U> ilist,
>>> Args&&...)
>>>
>>> instead of
>>>
>>> template <typename... Args>
>>> void set_value(Args&&... args);
>>> template <typename... Args>
>>> void set_value(std::initializer_list<U> ilist, Args&&...)
>>>
>>> Is there any way I can suggest changes to the paper?
>>>
>>> While an emplace function would be in line with the naming traditions
>>> of the older containers like std::vector::emplace_back, the newer ones
>>> like std::optional have an std::in_place_t parameter which conveys the
>>> implementation and effects to the user better.
>>>
>>> On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=82 Dominiak wr=
ote:
>>>>
>>>> FTR the paper in question (since it seems that OP hasn't seen it and
>>>> came up with the idea independently) is http://open-std.org/JTC1/SC
>>>> 22/WG21/docs/papers/2016/p0319r0.pdf.
>>>>
>>>> On Thu, Mar 2, 2017 at 11:23 PM Patrice Roy <patr...@gmail.com> wrote:
>>>>
>>>>> That was discussed yesterday in LEWG. Response was favorable but the
>>>>> paper still needs some work. Author will be notified.
>>>>>
>>>>> 2017-03-02 16:50 GMT-05:00 Curious <aa...@umich.edu>:
>>>>>
>>>>>> Currently there are two overloads to the set_value() method in the
>>>>>> std::promise class.
>>>>>>
>>>>>> void set_value( const R& value );
>>>>>> void set_value( R&& value );
>>>>>>
>>>>>> Both require one copy/move construction into the shared state.  I
>>>>>> feel like the class should also provide the user with the ability to
>>>>>> construct the value in place with a third (and possibly fourth for
>>>>>> generality since initializer lists are not deducible) overload
>>>>>>
>>>>>> template <typename... Args>
>>>>>> void set_value(std::in_place_t, Args&&... args);
>>>>>> template <typename U, typename... Args>
>>>>>> void set_value(std::in_place_t, std::initializer_list<U> ilist,
>>>>>> Args&&...)
>>>>>>
>>>>>> These overloads will allow the user to construct the value they want
>>>>>> to put into the promise/future in place.  Which should be valuable.
>>>>>>
>>>>>> --
>>>>>> 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-proposal...@isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals
>>>>>> /fc6bdee0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org
>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc6bde=
e0-26d3-43a2-ad6b-c0659f72590c%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>> .
>>>>>>
>>>>>
>>>>> --
>>>>> 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, sen=
d
>>>>> an email to std-proposal...@isocpp.org.
>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals
>>>>> /CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com
>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp=
3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3D=
email&utm_source=3Dfooter>
>>>>> .
>>>>>
>>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit https://groups.google.com/a/is
>>> ocpp.org/d/msgid/std-proposals/804a1e90-7f9d-4c04-a9c3-
>>> 997d6bb852a6%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/804a1e90-=
7f9d-4c04-a9c3-997d6bb852a6%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>>
>> --
> 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/2895933c-9ed0-47b3-
> b76d-b3d793f13e23%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2895933c-9e=
d0-47b3-b76d-b3d793f13e23%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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/CAKiZDp0M6b3RGRzXUag1n95qJNz8G7fSGC%2Bwvf1by9FHN=
E9edw%40mail.gmail.com.

--94eb2c1909e2e6758a0549c73805
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Just indicate the paper number for reference (and the titl=
e to make things simpler for him), I&#39;m sure it will work out<br></div><=
div class=3D"gmail_extra"><br><div class=3D"gmail_quote">2017-03-02 17:40 G=
MT-05:00 Curious <span dir=3D"ltr">&lt;<a href=3D"mailto:aary@umich.edu" ta=
rget=3D"_blank">aary@umich.edu</a>&gt;</span>:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr">Thanks!=C2=A0 I will contact the author via the emai=
l as stated in the paper, would you recommend an email subject?=C2=A0 I am =
not aware of the protocols regarding the standard library.=C2=A0<span class=
=3D""><br><br>On Thursday, March 2, 2017 at 5:35:33 PM UTC-5, Patrice Roy w=
rote:</span><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left=
:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D""><div d=
ir=3D"ltr">You should contact the OP; I&#39;m sure Vicente will be open for=
 ideas and discussion. And should you both not reach an agreement, competin=
g proposals are fine too.<br></div></span><div><br><div class=3D"gmail_quot=
e"><div><div class=3D"h5">2017-03-02 17:32 GMT-05:00  <span dir=3D"ltr">&lt=
;<a rel=3D"nofollow">aa...@umich.edu</a>&gt;</span>:<br></div></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div><div class=3D"h5"><div dir=3D"ltr">I feel like=
 it would be better (as far as what I would like to see in the C++ standard=
 library) to include an extra overload in the std::promise class with an <f=
ont face=3D"courier new, monospace">std::in_place_t</font> parameter rather=
 than an empty body (as the paper suggests) so, the following=C2=A0<div><br=
></div><div><span><div><font face=3D"courier new, monospace">template &lt;t=
ypename... Args&gt;</font></div><div><font face=3D"courier new, monospace">=
void set_value(std::in_place_t, Args&amp;&amp;... args);</font></div><div><=
font face=3D"courier new, monospace">template &lt;typename U, typename... A=
rgs&gt;</font></div><div><font face=3D"courier new, monospace">void set_val=
ue(std::in_place_t, std::initializer_list&lt;U&gt; ilist, Args&amp;&amp;...=
)</font></div><div><font face=3D"courier new, monospace"><br></font></div><=
/span><div><font face=3D"arial, sans-serif">instead of</font></div><div><fo=
nt face=3D"arial, sans-serif"><br></font></div><div><div><font face=3D"cour=
ier new, monospace">template &lt;typename... Args&gt;</font></div><div><fon=
t face=3D"courier new, monospace">void set_value(Args&amp;&amp;... args);</=
font></div><div><font face=3D"courier new, monospace">template &lt;typename=
.... Args&gt;</font></div><div><font face=3D"courier new, monospace">void se=
t_value(std::initializer_lis<wbr>t&lt;U&gt; ilist, Args&amp;&amp;...)</font=
></div></div><br>Is there any way I can suggest changes to the paper?</div>=
<div><br></div><div>While an <font face=3D"courier new, monospace">emplace<=
/font> function would be in line with the naming traditions of the older co=
ntainers like <font face=3D"courier new, monospace">std::vector::emplace_ba=
ck</font>, the newer ones like std::optional have an <font face=3D"courier =
new, monospace">std::in_place_t</font> parameter which conveys the implemen=
tation and effects to the user better.=C2=A0</div><div><br></div><div><span=
>On Thursday, March 2, 2017 at 5:26:14 PM UTC-5, Micha=C5=82 Dominiak wrote=
:</span><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8=
ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir=3D"ltr">FTR =
the paper in question (since it seems that OP hasn&#39;t seen it and came u=
p with the idea independently) is=C2=A0<a href=3D"http://open-std.org/JTC1/=
SC22/WG21/docs/papers/2016/p0319r0.pdf" rel=3D"nofollow" target=3D"_blank">=
http://open-std.org/JTC1/SC<wbr>22/WG21/docs/papers/2016/p0319<wbr>r0.pdf</=
a>.</div><br></span><div class=3D"gmail_quote"><span><div dir=3D"ltr">On Th=
u, Mar 2, 2017 at 11:23 PM Patrice Roy &lt;<a rel=3D"nofollow">patr...@gmai=
l.com</a>&gt; wrote:<br></div></span><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><=
div dir=3D"ltr">That was discussed yesterday in LEWG. Response was favorabl=
e but the paper still needs some work. Author will be notified.<br></div></=
span><div><br><div class=3D"gmail_quote"><span>2017-03-02 16:50 GMT-05:00 C=
urious <span dir=3D"ltr">&lt;<a rel=3D"nofollow">aa...@umich.edu</a>&gt;</s=
pan>:<br></span><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><span><div dir=3D"ltr">Curre=
ntly there are two overloads to the set_value() method in the std::promise =
class. =C2=A0<div><font face=3D"courier new, monospace"><br></font></div><d=
iv><font face=3D"courier new, monospace">void set_value( const R&amp; value=
 );<br></font></div><div><font face=3D"courier new, monospace">void set_val=
ue( R&amp;&amp; value );<br></font></div><div><br></div><div>Both require o=
ne copy/move construction into the shared state.=C2=A0 I feel like the clas=
s should also provide the user with the ability to construct the value in p=
lace with a third (and possibly fourth for generality since initializer lis=
ts are not deducible) overload</div><div><br></div><div><font face=3D"couri=
er new, monospace">template &lt;typename... Args&gt;</font></div><div><font=
 face=3D"courier new, monospace">void set_value(std::in_place_t, Args&amp;&=
amp;... args);</font></div><div><font face=3D"courier new, monospace">templ=
ate &lt;typename U, typename... Args&gt;</font></div><div><font face=3D"cou=
rier new, monospace">void set_value(std::in_place_t, std::initializer_list&=
lt;U&gt; ilist, Args&amp;&amp;...)</font></div><div><br></div><div>These ov=
erloads will allow the user to construct the value they want to put into th=
e promise/future in place.=C2=A0 Which should be valuable.=C2=A0</div></div=
></span><span><font color=3D"#888888"><span>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/fc6bdee0-26d3-43a2-ad6b-c0659f72590c%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/std-pr=
oposals<wbr>/fc6bdee0-26d3-43a2-ad6b-<wbr>c0659f72590c%40isocpp.org</a>.<br=
>
</span></font></span></blockquote></div><br></div><span>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp3gGud-OCu3YxXAGQ5rG9bLEYD6k5t9=
qg6JVdeX_2U1Hw%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter"=
 rel=3D"nofollow" target=3D"_blank">https://groups.google.com/a/is<wbr>ocpp=
..org/d/msgid/std-proposals<wbr>/CAKiZDp3gGud-OCu3YxXAGQ5rG9bL<wbr>EYD6k5t9q=
g6JVdeX_2U1Hw%40mail.<wbr>gmail.com</a>.<br>
</span></blockquote></div>
</blockquote></div></div><span>

<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span></div></div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/804a1e90-7f9d-4c04-a9c3-997d6bb852a6%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/std-pr=
oposals<wbr>/804a1e90-7f9d-4c04-a9c3-<wbr>997d6bb852a6%40isocpp.org</a>.<br=
>
</blockquote></div><br></div>
</blockquote></div><span class=3D"">

<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/2895933c-9ed0-47b3-b76d-b3d793f13e23%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/2895=
933c-9ed0-47b3-<wbr>b76d-b3d793f13e23%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></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/CAKiZDp0M6b3RGRzXUag1n95qJNz8G7fSGC%2=
Bwvf1by9FHNE9edw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0M6b3RGR=
zXUag1n95qJNz8G7fSGC%2Bwvf1by9FHNE9edw%40mail.gmail.com</a>.<br />

--94eb2c1909e2e6758a0549c73805--

.