11 #ifndef ASIO_EXECUTION_EXECUTE_HPP 12 #define ASIO_EXECUTION_EXECUTE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/detail/type_traits.hpp" 20 #include "asio/execution/detail/as_invocable.hpp" 21 #include "asio/execution/detail/as_receiver.hpp" 22 #include "asio/traits/execute_member.hpp" 23 #include "asio/traits/execute_free.hpp" 25 #include "asio/detail/push_options.hpp" 27 #if defined(GENERATING_DOCUMENTATION) 54 inline constexpr unspecified execute = unspecified;
62 template <
typename T,
typename F>
64 integral_constant<bool, automatically_determined>
71 #else // defined(GENERATING_DOCUMENTATION) 76 template <
typename T,
typename R>
81 template <
typename S,
typename R>
82 void submit_helper(ASIO_MOVE_ARG(S)
s, ASIO_MOVE_ARG(R) r);
89 using asio::conditional;
96 using asio::false_type;
97 using asio::result_of;
100 using asio::true_type;
112 template <
typename T,
typename F,
typename =
void>
115 ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
118 template <
typename T,
typename F>
127 ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
130 template <
typename T,
typename F>
141 ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
144 template <
typename T,
typename F>
152 conditional<true, true_type,
153 typename result_of<typename decay<F>::type&()>::type
158 typename decay<F>::type
162 as_receiver<typename decay<F>::type, T>
169 ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
170 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
171 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
false);
172 typedef void result_type;
177 template <
typename T,
typename F>
184 ASIO_MOVE_ARG(F) f)
const 188 return ASIO_MOVE_CAST(T)(t).execute(ASIO_MOVE_CAST(F)(f));
191 template <
typename T,
typename F>
193 call_traits<T, void(F)>::overload == call_free,
198 ASIO_MOVE_ARG(F) f)
const 202 return execute(ASIO_MOVE_CAST(T)(t), ASIO_MOVE_CAST(F)(f));
205 template <
typename T,
typename F>
207 call_traits<T, void(F)>::overload == adapter,
212 ASIO_MOVE_ARG(F) f)
const 216 return asio::execution::detail::submit_helper(
217 ASIO_MOVE_CAST(T)(t),
219 ASIO_MOVE_CAST(F)(f), 0));
223 template <
typename T = impl>
226 static const T instance;
229 template <
typename T>
242 template <
typename T,
typename F>
244 integral_constant<bool,
245 asio_execution_execute_fn::call_traits<T, void(F)>::overload !=
246 asio_execution_execute_fn::ill_formed>
250 #if defined(ASIO_HAS_VARIABLE_TEMPLATES) 252 template <
typename T,
typename F>
255 #endif // defined(ASIO_HAS_VARIABLE_TEMPLATES) 260 #endif // defined(GENERATING_DOCUMENTATION) 262 #include "asio/detail/pop_options.hpp" 264 #endif // ASIO_EXECUTION_EXECUTE_HPP Definition: blocking.hpp:208
Definition: execute_free.hpp:38
Definition: execute.hpp:243
Definition: execute.hpp:113
Definition: execute.hpp:175
Definition: as_receiver.hpp:31
Definition: execute_member.hpp:38
Definition: type_traits.hpp:97
Definition: execute.hpp:224
Definition: as_invocable.hpp:137
Definition: handler_work.hpp:37
Definition: execute.hpp:87
The is_sender_to trait detects whether a type T satisfies the execution::sender_to concept for some r...
Definition: execute.hpp:77
Definition: any_io_executor.hpp:28