Topic: N3634: future<R>::unwrap() return type
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Mon, 03 Jun 2013 07:33:40 +0200
Raw View
This is a multi-part message in MIME format.
--------------080009020303010900030103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
I guess the template parameter of the unwrap function has been used to
introduce the R2 type, but it is confusing.
template<typename R2>
future<R2> future<R>::unwrap()
I don't understand why the result of future<shared_future<R2>>::unwrap()
should be future<R2>. Shouldn't it be shared_future<R2>?
The same applies to shared_future<shared_future<R2>>::unwrap(). N3634
includes
- future<R2>Y = future<shared_future<R2>>.unwrap(), returns a
future<R2>that becomes ready when the shared state of the inner future
is ready. When the inner shared_future is ready, its value (or
exception) is copied to the shared state of the returned future.
If the result is shared_future<R2> there is no need to copy the inner
shared_future value, but just to copy the shared state. This doesn't add
new constraints on the type R2 which could be non Copyable.
Best,
Vicente
--
---
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/?hl=en.
--------------080009020303010900030103
Content-Type: text/html; charset=ISO-8859-1
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I guess the template parameter of the unwrap function has been used
to introduce the R2 type, but it is confusing.<br>
<br>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 216.04px; top: 352.6px; transform: scale(0.916747, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="218.98799999999997">template<typename R2></div>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 435.46px; top: 352.6px; transform: scale(0.916747, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="10.428"> </div>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 216.04px; top: 374.92px; transform: scale(0.917081, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="312.95376">future<R2>
future<R>::unwrap()</div>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 529.54px; top: 374.92px; transform: scale(0.916747, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="10.428"> </div>
<br>
<br>
I don't understand why the result of
future<shared_future<R2>>::unwrap() should be
future<R2>. Shouldn't it be shared_future<R2>?<br>
The same applies to
shared_future<shared_future<R2>>::unwrap(). N3634
includes<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr" style="font-size: 22.08px; font-family: sans-serif;
left: 1020.2px; top: 786.58px; transform: scale(0.908434, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1"
data-canvas-width="5.56416">- future<R2>Y =
future<shared_future<R2>>.unwrap(), returns a
future<R2>that becomes ready when the shared state of the
inner future is ready. When the inner shared_future is ready, its
value (or exception) is copied to the shared state of the returned
future.</div>
<div dir="ltr" style="font-size: 22.08px; font-family: sans-serif;
left: 1025.96px; top: 786.58px; transform: scale(0.814707, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p3_3"
data-canvas-width="4.99008"> </div>
<br>
If the result is shared_future<R2> there is no need to copy
the inner shared_future value, but just to copy the shared state.
This doesn't add new constraints on the type R2 which could be non
Copyable.<br>
<br>
Best,<br>
Vicente<br>
</body>
</html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
<br />
<br />
--------------080009020303010900030103--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Fri, 07 Jun 2013 21:19:20 +0200
Raw View
This is a multi-part message in MIME format.
--------------000309000202020303000908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 03/06/13 07:33, Vicente J. Botet Escriba a =E9crit :
> Hi,
>
> I guess the template parameter of the unwrap function has been used to=20
> introduce the R2 type, but it is confusing.
>
> template<typename R2>
> future<R2> future<R>::unwrap()
>
>
> I don't understand why the result of=20
> future<shared_future<R2>>::unwrap() should be future<R2>. Shouldn't it=20
> be shared_future<R2>?
> The same applies to shared_future<shared_future<R2>>::unwrap(). N3634=20
> includes
>
> - future<R2>Y =3D future<shared_future<R2>>.unwrap(), returns a=20
> future<R2>that becomes ready when the shared state of the inner future=20
> is ready. When the inner shared_future is ready, its value (or=20
> exception) is copied to the shared state of the returned future.
>
> If the result is shared_future<R2> there is no need to copy the inner=20
> shared_future value, but just to copy the shared state. This doesn't=20
> add new constraints on the type R2 which could be non Copyable.
>
Do the authors have any comments?
Best,
Vicente
--=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/?hl=3Den.
--------------000309000202020303000908
Content-Type: text/html; charset=ISO-8859-1
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 03/06/13 07:33, Vicente J. Botet
Escriba a écrit :<br>
</div>
<blockquote cite="mid:51AC2AB4.9050106@wanadoo.fr" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi,<br>
<br>
I guess the template parameter of the unwrap function has been
used to introduce the R2 type, but it is confusing.<br>
<br>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 216.04px; top: 352.6px; transform: scale(0.916747, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="218.98799999999997">template<typename
R2></div>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 435.46px; top: 352.6px; transform: scale(0.916747, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="10.428"> </div>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 216.04px; top: 374.92px; transform: scale(0.917081, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="312.95376">future<R2>
future<R>::unwrap()</div>
<div dir="ltr" style="font-size: 18.96px; font-family: monospace;
left: 529.54px; top: 374.92px; transform: scale(0.916747, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p2_4"
data-canvas-width="10.428"> </div>
<br>
<br>
I don't understand why the result of
future<shared_future<R2>>::unwrap() should be
future<R2>. Shouldn't it be shared_future<R2>?<br>
The same applies to
shared_future<shared_future<R2>>::unwrap(). N3634
includes<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr" style="font-size: 22.08px; font-family: sans-serif;
left: 1020.2px; top: 786.58px; transform: scale(0.908434, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1"
data-canvas-width="5.56416">- future<R2>Y =
future<shared_future<R2>>.unwrap(), returns a
future<R2>that becomes ready when the shared state of the
inner future is ready. When the inner shared_future is ready,
its value (or exception) is copied to the shared state of the
returned future.</div>
<div dir="ltr" style="font-size: 22.08px; font-family: sans-serif;
left: 1025.96px; top: 786.58px; transform: scale(0.814707, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p3_3"
data-canvas-width="4.99008"> </div>
<br>
If the result is shared_future<R2> there is no need to copy
the inner shared_future value, but just to copy the shared state.
This doesn't add new constraints on the type R2 which could be non
Copyable.<br>
<br>
</blockquote>
Do the authors have any comments?<br>
<br>
Best,<br>
Vicente<br>
</body>
</html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
<br />
<br />
--------------000309000202020303000908--
.