Topic: emplace_value for std::promise


Author: oliora@gmail.com
Date: Sun, 12 Jul 2015 23:46:38 -0700 (PDT)
Raw View
------=_Part_4672_259778409.1436769998515
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello!

In current specification `std::promise` allows to set furure's value only b=
y copying or moving from already constructed value type. I want to propose =
to add `emplace_value` function to `std::promise`. This function allows in-=
place construction of future's value by forwarding all arguments to value's=
 constructor(as any other emplace/emplace_xxx function do in STL). Function=
 signature is:
template <class... Args>
void emplace_value(Args&&... args);

What do you think about such proposal? Probably it was already discussed bu=
t I missed this? I would appreciate for any feedback.

Thank you,
Andrey Upadyshev <oliora@gmail.com>

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_4672_259778409.1436769998515--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 13 Jul 2015 15:18:58 +0800
Raw View
--Apple-Mail=_3CD5A681-3014-43B6-BF4A-00E6B92C5AEF
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9307=E2=80=9313, at 2:46 PM, oliora@gmail.com wrote:
>=20
> template <class... Args>
> void emplace_value(Args&&... args);
>=20
> What do you think about such proposal? Probably it was already discussed =
but I missed this? I would appreciate for any feedback.

This should also harmonize with allocator support. The allocator=E2=80=99s =
construct method should be type-erased, to support e.g. nested_allocator_ad=
aptor. This is possible for the copy and move constructors, but not arbitra=
ry parameter lists.

One workaround is to do away with erasure in this case, and add another tem=
plate parameter to let emplace statically know the allocator type. The stat=
ic and dynamic types would have to match.

template <class Allocator =3D allocator<R>, class... Args>
void emplace_value(Args&&... args);

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_3CD5A681-3014-43B6-BF4A-00E6B92C5AEF
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9307=
=E2=80=9313, at 2:46 PM, <a href=3D"mailto:oliora@gmail.com" class=3D"">oli=
ora@gmail.com</a> wrote:</div><br class=3D"Apple-interchange-newline"><div =
class=3D""><span style=3D"font-family: Helvetica; font-size: 12px; font-sty=
le: normal; font-variant: normal; font-weight: normal; letter-spacing: norm=
al; line-height: normal; orphans: auto; text-align: start; text-indent: 0px=
; text-transform: none; white-space: normal; widows: auto; word-spacing: 0p=
x; -webkit-text-stroke-width: 0px; float: none; display: inline !important;=
" class=3D"">template &lt;class... Args&gt;</span><br style=3D"font-family:=
 Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font=
-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto=
; text-align: start; text-indent: 0px; text-transform: none; white-space: n=
ormal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" cl=
ass=3D""><span style=3D"font-family: Helvetica; font-size: 12px; font-style=
: normal; font-variant: normal; font-weight: normal; letter-spacing: normal=
; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;=
 -webkit-text-stroke-width: 0px; float: none; display: inline !important;" =
class=3D"">void emplace_value(Args&amp;&amp;... args);</span><br style=3D"f=
ont-family: Helvetica; font-size: 12px; font-style: normal; font-variant: n=
ormal; font-weight: normal; letter-spacing: normal; line-height: normal; or=
phans: auto; text-align: start; text-indent: 0px; text-transform: none; whi=
te-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-widt=
h: 0px;" class=3D""><br style=3D"font-family: Helvetica; font-size: 12px; f=
ont-style: normal; font-variant: normal; font-weight: normal; letter-spacin=
g: normal; line-height: normal; orphans: auto; text-align: start; text-inde=
nt: 0px; text-transform: none; white-space: normal; widows: auto; word-spac=
ing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=3D"font-f=
amily: Helvetica; font-size: 12px; font-style: normal; font-variant: normal=
; font-weight: normal; letter-spacing: normal; line-height: normal; orphans=
: auto; text-align: start; text-indent: 0px; text-transform: none; white-sp=
ace: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0p=
x; float: none; display: inline !important;" class=3D"">What do you think a=
bout such proposal? Probably it was already discussed but I missed this? I =
would appreciate for any feedback.</span><br style=3D"font-family: Helvetic=
a; font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; orphans: auto; text-al=
ign: start; text-indent: 0px; text-transform: none; white-space: normal; wi=
dows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">=
</div></blockquote></div><br class=3D""><div class=3D"">This should also ha=
rmonize with allocator support. The allocator=E2=80=99s <font face=3D"Couri=
er" class=3D"">construct</font> method should be type-erased, to support e.=
g. <font face=3D"Courier" class=3D"">nested_allocator_adaptor</font>. This =
is possible for the copy and move constructors, but not arbitrary parameter=
 lists.</div><div class=3D""><br class=3D""></div><div class=3D"">One worka=
round is to do away with erasure in this case, and add another template par=
ameter to let <font face=3D"Courier" class=3D"">emplace</font>&nbsp;statica=
lly know the allocator type. The static and dynamic types would have to mat=
ch.</div><div class=3D""><br class=3D""></div><div class=3D""><font face=3D=
"Courier" class=3D"">template &lt;class Allocator =3D allocator&lt;R&gt;, c=
lass... Args&gt;<br class=3D"">void emplace_value(Args&amp;&amp;... args);<=
br class=3D""></font></div><div class=3D""><br class=3D""></div></body></ht=
ml>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_3CD5A681-3014-43B6-BF4A-00E6B92C5AEF--

.


Author: oliora@gmail.com
Date: Mon, 13 Jul 2015 02:25:33 -0700 (PDT)
Raw View
------=_Part_34_126062293.1436779533943
Content-Type: text/plain; charset=UTF-8

Allocator support can be done by adding one more `std::promise` function:
template< class Alloc, class... Args >
void allocate_value( const Alloc& alloc, Args... args );

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_34_126062293.1436779533943--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 13 Jul 2015 17:38:23 +0800
Raw View
--Apple-Mail=_515AF010-5DEA-4918-83E0-031B79C8C2A8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9307=E2=80=9313, at 5:25 PM, oliora@gmail.com wrote:
>=20
> Allocator support can be done by adding one more `std::promise` function:
> template< class Alloc, class... Args >
> void allocate_value( const Alloc& alloc, Args... args );

You wouldn=E2=80=99t want to pass an alloc argument. The promise already st=
ores an allocator set by the receiver. The memory model is that the receive=
r decides how to store the result, and the sender shouldn=E2=80=99t need to=
 commit resources just to fulfill the promise. (What if its only available =
resource pool is tied to the thread?)

The only problem is that the allocator type specified to the receiver is un=
known to the sender, hence providing for an explicit type argument. An addi=
tional allocate_value function would solve the problem if it were a matter =
of a missing feature, but that=E2=80=99s not what=E2=80=99s going on here.

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_515AF010-5DEA-4918-83E0-031B79C8C2A8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9307=
=E2=80=9313, at 5:25 PM, <a href=3D"mailto:oliora@gmail.com" class=3D"">oli=
ora@gmail.com</a> wrote:</div><br class=3D"Apple-interchange-newline"><div =
class=3D"">Allocator support can be done by adding one more `std::promise` =
function:<br class=3D"">template&lt; class Alloc, class... Args &gt;<br cla=
ss=3D"">void allocate_value( const Alloc&amp; alloc, Args... args );<br cla=
ss=3D""></div></blockquote></div><br class=3D""><div class=3D"">You wouldn=
=E2=80=99t want to pass an <font face=3D"Courier" class=3D"">alloc</font> a=
rgument. The <font face=3D"Courier" class=3D"">promise</font> already store=
s an allocator set by the receiver. The memory model is that the receiver d=
ecides how to store the result, and the sender shouldn=E2=80=99t need to co=
mmit resources just to fulfill the promise. (What if its only available res=
ource pool is tied to the thread?)</div><div class=3D""><br class=3D""></di=
v><div class=3D"">The only problem is that the allocator <i class=3D"">type=
</i> specified to the receiver is unknown to the sender, hence providing fo=
r an explicit type argument. An additional <font face=3D"Courier" class=3D"=
">allocate_value</font> function would solve the problem if it were a matte=
r of a missing feature, but that=E2=80=99s not what=E2=80=99s going on here=
..</div><div class=3D""><br class=3D""></div></body></html>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_515AF010-5DEA-4918-83E0-031B79C8C2A8--

.


Author: oliora@gmail.com
Date: Mon, 13 Jul 2015 07:27:06 -0700 (PDT)
Raw View
------=_Part_576_1267892460.1436797626717
Content-Type: multipart/alternative;
 boundary="----=_Part_577_1922567065.1436797626717"

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

I got what you meant. I don't see a nice way to implement emplace_value in=
=20
current promise (I dislike idea to pass allocator type to emplace_value)=20
but looks like emplace_value will play well together with polymorphic=20
allocators (http://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3916.pdf)=
=20
that's approved to be included into standard.

On Monday, July 13, 2015 at 11:38:39 AM UTC+2, David Krauss wrote:
>
>
> On 2015=E2=80=9307=E2=80=9313, at 5:25 PM, oli...@gmail.com <javascript:>=
 wrote:
>
> Allocator support can be done by adding one more `std::promise` function:
> template< class Alloc, class... Args >
> void allocate_value( const Alloc& alloc, Args... args );
>
>
> You wouldn=E2=80=99t want to pass an alloc argument. The promise already =
stores=20
> an allocator set by the receiver. The memory model is that the receiver=
=20
> decides how to store the result, and the sender shouldn=E2=80=99t need to=
 commit=20
> resources just to fulfill the promise. (What if its only available resour=
ce=20
> pool is tied to the thread?)
>
> The only problem is that the allocator *type* specified to the receiver=
=20
> is unknown to the sender, hence providing for an explicit type argument. =
An=20
> additional allocate_value function would solve the problem if it were a=
=20
> matter of a missing feature, but that=E2=80=99s not what=E2=80=99s going =
on here.
>
>

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

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

<div dir=3D"ltr">I got what you meant. I don&#39;t see a nice way to implem=
ent emplace_value in current promise (I dislike idea to pass allocator type=
 to emplace_value) but looks like emplace_value will play well together wit=
h polymorphic allocators (http://open-std.org/JTC1/SC22/WG21/docs/papers/20=
14/n3916.pdf) that&#39;s approved to be included into standard.<br><br>On M=
onday, July 13, 2015 at 11:38:39 AM UTC+2, David Krauss wrote:<blockquote c=
lass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px=
 #ccc solid;padding-left: 1ex;"><div style=3D"word-wrap:break-word"><br><di=
v><blockquote type=3D"cite"><div>On 2015=E2=80=9307=E2=80=9313, at 5:25 PM,=
 <a href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">oli...@gmail.com</a> wrote:</div><br><div>A=
llocator support can be done by adding one more `std::promise` function:<br=
>template&lt; class Alloc, class... Args &gt;<br>void allocate_value( const=
 Alloc&amp; alloc, Args... args );<br></div></blockquote></div><br><div>You=
 wouldn=E2=80=99t want to pass an <font face=3D"Courier">alloc</font> argum=
ent. The <font face=3D"Courier">promise</font> already stores an allocator =
set by the receiver. The memory model is that the receiver decides how to s=
tore the result, and the sender shouldn=E2=80=99t need to commit resources =
just to fulfill the promise. (What if its only available resource pool is t=
ied to the thread?)</div><div><br></div><div>The only problem is that the a=
llocator <i>type</i> specified to the receiver is unknown to the sender, he=
nce providing for an explicit type argument. An additional <font face=3D"Co=
urier">allocate_value</font> function would solve the problem if it were a =
matter of a missing feature, but that=E2=80=99s not what=E2=80=99s going on=
 here.</div><div><br></div></div></blockquote></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_577_1922567065.1436797626717--
------=_Part_576_1267892460.1436797626717--

.


Author: David Krauss <potswa@gmail.com>
Date: Tue, 14 Jul 2015 00:34:38 +0800
Raw View
--Apple-Mail=_74EEA412-ED57-4836-BB90-8C2FFCB27425
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9307=E2=80=9313, at 10:27 PM, oliora@gmail.com wrote:
>=20
> I got what you meant. I don't see a nice way to implement emplace_value i=
n current promise (I dislike idea to pass allocator type to emplace_value)

Why?

> but looks like emplace_value will play well together with polymorphic all=
ocators (http://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3916.pdf <htt=
p://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3916.pdf>) that's approve=
d to be included into standard.

Polymorphic memory resources implement a subset of allocator functionality.=
 They are in the Library Fundamentals TS (N4480), not the standard.

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_74EEA412-ED57-4836-BB90-8C2FFCB27425
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9307=
=E2=80=9313, at 10:27 PM, <a href=3D"mailto:oliora@gmail.com" class=3D"">ol=
iora@gmail.com</a> wrote:</div><br class=3D"Apple-interchange-newline"><div=
 class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetica; font-size: 12=
px; font-style: normal; font-variant: normal; font-weight: normal; letter-s=
pacing: normal; line-height: normal; orphans: auto; text-align: start; text=
-indent: 0px; text-transform: none; white-space: normal; widows: auto; word=
-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">I got what you m=
eant. I don't see a nice way to implement emplace_value in current promise =
(I dislike idea to pass allocator type to emplace_value) </div></div></bloc=
kquote><div><br class=3D""></div><div>Why?</div><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D""><div dir=3D"ltr" style=3D"font-fam=
ily: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; orphans: =
auto; text-align: start; text-indent: 0px; text-transform: none; white-spac=
e: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;=
" class=3D"">but looks like emplace_value will play well together with poly=
morphic allocators (<a href=3D"http://open-std.org/JTC1/SC22/WG21/docs/pape=
rs/2014/n3916.pdf" class=3D"">http://open-std.org/JTC1/SC22/WG21/docs/paper=
s/2014/n3916.pdf</a>) that's approved to be included into standard.<br clas=
s=3D""></div></div></blockquote></div><br class=3D""><div class=3D"">Polymo=
rphic memory resources implement a subset of allocator functionality. They =
are in the Library Fundamentals TS (N4480), not the standard.</div><div cla=
ss=3D""><br class=3D""></div></body></html>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_74EEA412-ED57-4836-BB90-8C2FFCB27425--

.


Author: Andrey Upadyshev <oliora@gmail.com>
Date: Mon, 13 Jul 2015 19:14:00 +0200
Raw View
--Apple-Mail-6F26286C-5A6A-4476-A895-42DAAE8173C2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Because user has to manually match constructor's and emplace_value allocato=
r types and this is error prone.

I'm not aware about what is a difference between the standard and TS approv=
ed by committee. Is not the latter are just something available between sta=
ndard big releases?

As I understand paragraph 9.2 of polymorphic allocators spec, std::promise =
will be a type using polymorphic allocator (instead of ordinal one).

Best Regards,
Andrey Upadyshev

> On 13 Jul 2015, at 18:34, David Krauss <potswa@gmail.com> wrote:
>=20
>=20
>> On 2015=E2=80=9307=E2=80=9313, at 10:27 PM, oliora@gmail.com wrote:
>>=20
>> I got what you meant. I don't see a nice way to implement emplace_value =
in current promise (I dislike idea to pass allocator type to emplace_value)
>=20
> Why?
>=20
>> but looks like emplace_value will play well together with polymorphic al=
locators (http://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3916.pdf) th=
at's approved to be included into standard.
>=20
> Polymorphic memory resources implement a subset of allocator functionalit=
y. They are in the Library Fundamentals TS (N4480), not the standard.
>=20
> --=20
>=20
> ---=20
> You received this message because you are subscribed to a topic in the Go=
ogle Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/lDj5Tq1NG-s/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to std-p=
roposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at http://groups.google.com/a/isocpp.org/group/std-propo=
sals/.

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail-6F26286C-5A6A-4476-A895-42DAAE8173C2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=
=3Dutf-8"></head><body dir=3D"auto"><div>Because user has to manually match=
 constructor's and emplace_value allocator types and this is error prone.</=
div><div><br></div><div>I'm not aware about what is a difference between th=
e standard and TS approved by&nbsp;<span style=3D"background-color: rgba(25=
5, 255, 255, 0);">committee. Is not the latter are just something available=
 between standard big releases?</span></div><div><span style=3D"background-=
color: rgba(255, 255, 255, 0);"><br></span></div><div><span style=3D"backgr=
ound-color: rgba(255, 255, 255, 0);">As I understand paragraph 9.2 of polym=
orphic allocators spec, std::promise will be a type using polymorphic alloc=
ator (instead of ordinal one).</span></div><div><br></div><div>Best Regards=
,<div>Andrey Upadyshev</div></div><div><br>On 13 Jul 2015, at 18:34, David =
Krauss &lt;<a href=3D"mailto:potswa@gmail.com">potswa@gmail.com</a>&gt; wro=
te:<br><br></div><blockquote type=3D"cite"><div><meta http-equiv=3D"Content=
-Type" content=3D"text/html charset=3Dutf-8"><br class=3D""><div><blockquot=
e type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9307=E2=80=9313, a=
t 10:27 PM, <a href=3D"mailto:oliora@gmail.com" class=3D"">oliora@gmail.com=
</a> wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><d=
iv dir=3D"ltr" style=3D"font-family: Helvetica; font-size: 12px; font-style=
: normal; font-variant: normal; font-weight: normal; letter-spacing: normal=
; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;=
 -webkit-text-stroke-width: 0px;" class=3D"">I got what you meant. I don't =
see a nice way to implement emplace_value in current promise (I dislike ide=
a to pass allocator type to emplace_value) </div></div></blockquote><div><b=
r class=3D""></div><div>Why?</div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetica=
; font-size: 12px; font-style: normal; font-variant: normal; font-weight: n=
ormal; letter-spacing: normal; line-height: normal; orphans: auto; text-ali=
gn: start; text-indent: 0px; text-transform: none; white-space: normal; wid=
ows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">b=
ut looks like emplace_value will play well together with polymorphic alloca=
tors (<a href=3D"http://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3916.=
pdf" class=3D"">http://open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3916.p=
df</a>) that's approved to be included into standard.<br class=3D""></div><=
/div></blockquote></div><br class=3D""><div class=3D"">Polymorphic memory r=
esources implement a subset of allocator functionality. They are in the Lib=
rary Fundamentals TS (N4480), not the standard.</div><div class=3D""><br cl=
ass=3D""></div>

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups "ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/lDj5Tq1NG-s/unsubscribe">https://groups.=
google.com/a/isocpp.org/d/topic/std-proposals/lDj5Tq1NG-s/unsubscribe</a>.<=
br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br>
</div></blockquote></body></html>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail-6F26286C-5A6A-4476-A895-42DAAE8173C2--

.