11 #ifndef ASIO_IMPL_USE_FUTURE_HPP 12 #define ASIO_IMPL_USE_FUTURE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 36 template <
typename Allocator>
39 uf.get_allocator(),
std::allocator_arg, uf.get_allocator()))
52 std::make_exception_ptr(
68 template <
typename Allocator>
71 uf.get_allocator(),
std::allocator_arg, uf.get_allocator()))
84 std::make_exception_ptr(
96 template <
typename Function,
typename T>
99 std::shared_ptr<std::promise<T> > p(h->
promise_);
106 p->set_exception(std::current_exception());
112 #if !defined(GENERATING_DOCUMENTATION) 115 template <
typename T>
130 type
get() {
return std::move(value_); }
137 template <
typename Allocator,
typename ReturnType>
144 template <
typename Allocator,
typename ReturnType,
typename Arg1>
151 template <
typename Allocator,
typename ReturnType>
159 template <
typename Allocator,
typename ReturnType,
typename Arg2>
166 #endif // !defined(GENERATING_DOCUMENTATION) 172 #endif // ASIO_IMPL_USE_FUTURE_HPP
An interface for customising the behaviour of an initiating function.
Class used to specify that an asynchronous operation should return a future.
promise_handler(use_future_t< Allocator > uf)
void operator()(const asio::error_code &ec)
std::shared_ptr< std::promise< void > > promise_
std::shared_ptr< std::promise< T > > promise_
detail::promise_handler< Arg2 > type
async_result(detail::promise_handler< T > &h)
detail::promise_handler< void > type
void asio_handler_invoke(Function &function, binder1< Handler, Arg1 > *this_handler)
Class to represent an error code value.
promise_handler(use_future_t< Allocator > uf)
detail::promise_handler< Arg1 > type
void operator()(const asio::error_code &ec, T t)
detail::promise_handler< void > type
Default handler type traits provided for all handlers.