13 Asynchronous model [async]

13.14 Class template executor_binder [async.exec.binder]

13.14.4 Class template partial specialization async_result [async.exec.binder.async.result]

namespace std {
namespace experimental {
namespace net {
inline namespace v1 {

  template<class T, class Executor, class Signature>
  class async_result<executor_binder<T, Executor>, Signature>
  {
  public:
    using completion_handler_type = executor_binder<
      typename async_result<T, Signature>::completion_handler_type,
        Executor>;
    using return_type = typename async_result<T, Signature>::return_type;

    explicit async_result(completion_handler_type& h);
    async_result(const async_result&) = delete;
    async_result& operator=(const async_result&) = delete;

    return_type get();

  private:
    async_result<T, Signature> target_; // exposition only
  };

} // inline namespace v1
} // namespace net
} // namespace experimental
} // namespace std

explicit async_result(completion_handler_type& h);

Effects: Initializes target_ as target_(h.get()).

return_type get();

Returns: target_.get().