2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-31 07:42:10 +00:00
Files
asio/doc
Christopher Kohlhoff 0568d3bf0b New async_result form with initiate() static member function.
The `async_result` template now supports a new form:

    template <typename CompletionToken, typename Signature>
    struct async_result
    {
      typedef /* ... */ return_type;

      template <typename Initiation,
          typename RawCompletionToken,
          typename... Args>
      static return_type initiate(
          Initiation&& initiation,
          RawCompletionToken&& token,
          Args&&... args);
    };

The `initiate()` function must:

* Transform the token into a completion handler object `handler`.

* Cause the invocation of the function object `initiation` as if
  by calling:

    std::forward<Initiation>(initiation)(
        std::move(handler),
        std::forward<Args>(args)...);

The invocation of `initiation` may be deferred (e.g. lazily evaluated),
in which case `initiation` and `args` must be decay-copied and moved
as required.

A helper function template `async_initiate` has also been added as a
wrapper for the invocation of `async_result<>::initiate`. For backward
compatibility, this function supports both the old and new async_result
forms.
2019-02-17 20:00:19 -10:00
..
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2014-05-05 11:48:23 +10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2013-05-25 13:03:48 +00:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00
2019-02-17 19:59:39 -10:00