Topic: N3558 :A standardized representation of Asynchronous operation


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Fri, 24 May 2013 19:07:20 +0200
Raw View
This is a multi-part message in MIME format.
--------------020701080503020704020605
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi,

What is the rationale for when_all to return future<vector<future<R>>>
instead of future<vector<R>>?
What is the rationale for when_any to return future<vector<future<R>>>
instead of future<pair<size_t, R>> ?

What about adding when_all overload for containers that return the same
container type instead of a vector?

*template <typename C>**
**future<see below> when_all(C c);**
*Requires: C is a Container, C::value_type is of type future<R> or
shared_future<R>.
Return Type: A future having the same container type but with a
value_type R.
Returns: A future having a container with all the future values.

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.



--------------020701080503020704020605
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>
    What is the rationale for when_all to return
    future&lt;vector&lt;future&lt;R&gt;&gt;&gt; instead of&nbsp;
    future&lt;vector&lt;R&gt;&gt;? <br>
    What is the rationale for when_any to return
    future&lt;vector&lt;future&lt;R&gt;&gt;&gt; instead of
    future&lt;pair&lt;size_t, R&gt;&gt; ? <br>
    <br>
    What about adding when_all overload for containers that return the
    same container type instead of a vector?<br>
    <br>
    <b>template &lt;typename C&gt;</b><b><br>
    </b><b>future&lt;see below&gt; when_all(C c);</b><b><br>
    </b>Requires: C is a Container, C::value_type is of type
    future&lt;R&gt; or shared_future&lt;R&gt;.<br>
    Return Type: A future having the same container type but with a
    value_type R.<br>
    Returns: A future having a container with all the future values.<br>
    <br>
    Best,<br>
    Vicente<br>
  </body>
</html>

<p></p>

-- <br />
&nbsp;<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 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 />
&nbsp;<br />
&nbsp;<br />

--------------020701080503020704020605--

.