-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
fc05ce4
commit 62c4488
Showing
35 changed files
with
1,743 additions
and
1,217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.