11 #ifndef ASIO_EXECUTION_BLOCKING_HPP 12 #define ASIO_EXECUTION_BLOCKING_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/execute.hpp" 21 #include "asio/execution/executor.hpp" 22 #include "asio/execution/scheduler.hpp" 23 #include "asio/execution/sender.hpp" 24 #include "asio/is_applicable_property.hpp" 25 #include "asio/prefer.hpp" 26 #include "asio/query.hpp" 27 #include "asio/require.hpp" 28 #include "asio/traits/query_free.hpp" 29 #include "asio/traits/query_member.hpp" 30 #include "asio/traits/query_static_constexpr_member.hpp" 31 #include "asio/traits/static_query.hpp" 32 #include "asio/traits/static_require.hpp" 34 #include "asio/detail/push_options.hpp" 38 #if defined(GENERATING_DOCUMENTATION) 48 static constexpr
bool is_applicable_property_v =
49 is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
52 static constexpr
bool is_requirable =
false;
55 static constexpr
bool is_preferable =
false;
58 typedef blocking_t polymorphic_query_result_type;
68 static constexpr
bool is_applicable_property_v =
69 is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
72 static constexpr
bool is_requirable =
true;
75 static constexpr
bool is_preferable =
true;
78 typedef blocking_t polymorphic_query_result_type;
81 constexpr possibly_t();
87 static constexpr blocking_t value();
98 static constexpr
bool is_applicable_property_v =
99 is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
102 static constexpr
bool is_requirable =
true;
105 static constexpr
bool is_preferable =
false;
108 typedef blocking_t polymorphic_query_result_type;
111 constexpr always_t();
117 static constexpr blocking_t value();
127 template <
typename T>
128 static constexpr
bool is_applicable_property_v =
129 is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
132 static constexpr
bool is_requirable =
true;
135 static constexpr
bool is_preferable =
true;
138 typedef blocking_t polymorphic_query_result_type;
147 static constexpr blocking_t value();
151 static constexpr possibly_t possibly;
154 static constexpr always_t always;
157 static constexpr never_t never;
160 constexpr blocking_t();
163 constexpr blocking_t(possibly_t);
166 constexpr blocking_t(always_t);
169 constexpr blocking_t(never_t);
172 friend constexpr
bool operator==(
173 const blocking_t& a,
const blocking_t& b) noexcept;
176 friend constexpr
bool operator!=(
177 const blocking_t& a,
const blocking_t& b) noexcept;
181 constexpr blocking_t blocking;
185 #else // defined(GENERATING_DOCUMENTATION) 196 namespace blocking_adaptation {
200 template <
typename Executor,
typename Function>
201 void blocking_execute(
202 ASIO_MOVE_ARG(Executor) ex,
203 ASIO_MOVE_ARG(Function) func);
210 #if defined(ASIO_HAS_VARIABLE_TEMPLATES) 211 template <
typename T>
212 ASIO_STATIC_CONSTEXPR(
bool,
215 #endif // defined(ASIO_HAS_VARIABLE_TEMPLATES) 230 ASIO_CONSTEXPR blocking_t(possibly_t)
235 ASIO_CONSTEXPR blocking_t(always_t)
240 ASIO_CONSTEXPR blocking_t(never_t)
245 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 246 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 247 template <
typename T>
248 static ASIO_CONSTEXPR
257 template <
typename T>
258 static ASIO_CONSTEXPR
265 >::type* = 0) ASIO_NOEXCEPT
270 template <
typename T>
271 static ASIO_CONSTEXPR
279 >::type* = 0) ASIO_NOEXCEPT
284 template <
typename T>
285 static ASIO_CONSTEXPR
294 >::type* = 0) ASIO_NOEXCEPT
299 template <
typename E,
typename T = decltype(blocking_t::static_query<E>())>
300 static ASIO_CONSTEXPR
const T static_query_v
301 = blocking_t::static_query<E>();
302 #endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) 305 friend ASIO_CONSTEXPR
bool operator==(
306 const blocking_t& a,
const blocking_t& b)
308 return a.value_ == b.value_;
311 friend ASIO_CONSTEXPR
bool operator!=(
312 const blocking_t& a,
const blocking_t& b)
314 return a.value_ != b.value_;
322 template <
typename Executor>
323 friend ASIO_CONSTEXPR blocking_t query(
328 #if !defined(__clang__) // Clang crashes if noexcept is used here. 329 #if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified. 332 #else // defined(ASIO_MSVC) 335 #endif // defined(ASIO_MSVC) 336 #endif // !defined(__clang__) 338 return asio::query(ex, possibly_t());
341 template <
typename Executor>
342 friend ASIO_CONSTEXPR blocking_t query(
348 #if !defined(__clang__) // Clang crashes if noexcept is used here. 349 #if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified. 352 #else // defined(ASIO_MSVC) 355 #endif // defined(ASIO_MSVC) 356 #endif // !defined(__clang__) 358 return asio::query(ex, always_t());
361 template <
typename Executor>
362 friend ASIO_CONSTEXPR blocking_t query(
369 #if !defined(__clang__) // Clang crashes if noexcept is used here. 370 #if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified. 373 #else // defined(ASIO_MSVC) 376 #endif // defined(ASIO_MSVC) 377 #endif // !defined(__clang__) 379 return asio::query(ex, never_t());
382 ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(possibly_t, possibly);
383 ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(always_t, always);
384 ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(never_t, never);
386 #if !defined(ASIO_HAS_CONSTEXPR) 387 static const blocking_t instance;
388 #endif // !defined(ASIO_HAS_CONSTEXPR) 394 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 395 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 396 template <
int I>
template <
typename E,
typename T>
398 #endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) 401 #if !defined(ASIO_HAS_CONSTEXPR) 420 #if defined(ASIO_HAS_VARIABLE_TEMPLATES) 421 template <
typename T>
422 ASIO_STATIC_CONSTEXPR(
bool,
425 #endif // defined(ASIO_HAS_VARIABLE_TEMPLATES) 435 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 436 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 437 template <
typename T>
438 static ASIO_CONSTEXPR
447 template <
typename T>
448 static ASIO_CONSTEXPR
possibly_t static_query(
455 >::type* = 0) ASIO_NOEXCEPT
460 template <
typename E,
typename T = decltype(possibly_t::static_query<E>())>
461 static ASIO_CONSTEXPR
const T static_query_v
462 = possibly_t::static_query<E>();
463 #endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 471 friend ASIO_CONSTEXPR
bool operator==(
477 friend ASIO_CONSTEXPR
bool operator!=(
483 friend ASIO_CONSTEXPR
bool operator==(
489 friend ASIO_CONSTEXPR
bool operator!=(
495 friend ASIO_CONSTEXPR
bool operator==(
501 friend ASIO_CONSTEXPR
bool operator!=(
508 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 509 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 510 template <
int I>
template <
typename E,
typename T>
512 #endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) 515 template <
typename Executor>
519 adapter(
int,
const Executor& e) ASIO_NOEXCEPT
525 : executor_(other.executor_)
529 #if defined(ASIO_HAS_MOVE) 531 : executor_(ASIO_MOVE_CAST(Executor)(other.executor_))
534 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 564 template <
typename Property>
567 typename query_result<const Executor&, Property>::type
568 >::type query(
const Property& p)
const 572 return asio::query(executor_, p);
588 >::type require(
never_t<I>)
const ASIO_NOEXCEPT
590 return asio::require(executor_,
never_t<I>());
593 template <
typename Property>
597 typename require_result<const Executor&, Property>::type
599 >::type require(
const Property& p)
const 604 typename require_result<const Executor&, Property>::type
605 >::type>(0, asio::require(executor_, p));
608 template <
typename Property>
612 typename prefer_result<const Executor&, Property>::type
614 >::type prefer(
const Property& p)
const 619 typename prefer_result<const Executor&, Property>::type
620 >::type>(0, asio::prefer(executor_, p));
623 template <
typename Function>
626 >::type execute(ASIO_MOVE_ARG(Function) f)
const 628 blocking_adaptation::blocking_execute(
629 executor_, ASIO_MOVE_CAST(Function)(f));
632 friend bool operator==(
const adapter& a,
const adapter& b) ASIO_NOEXCEPT
634 return a.executor_ == b.executor_;
637 friend bool operator!=(
const adapter& a,
const adapter& b) ASIO_NOEXCEPT
639 return a.executor_ != b.executor_;
649 #if defined(ASIO_HAS_VARIABLE_TEMPLATES) 650 template <
typename T>
651 ASIO_STATIC_CONSTEXPR(
bool,
654 #endif // defined(ASIO_HAS_VARIABLE_TEMPLATES) 664 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 665 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 666 template <
typename T>
667 static ASIO_CONSTEXPR
676 template <
typename E,
typename T = decltype(always_t::static_query<E>())>
677 static ASIO_CONSTEXPR
const T static_query_v
678 = always_t::static_query<E>();
679 #endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 687 friend ASIO_CONSTEXPR
bool operator==(
693 friend ASIO_CONSTEXPR
bool operator!=(
699 friend ASIO_CONSTEXPR
bool operator==(
705 friend ASIO_CONSTEXPR
bool operator!=(
711 friend ASIO_CONSTEXPR
bool operator==(
717 friend ASIO_CONSTEXPR
bool operator!=(
723 template <
typename Executor>
738 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 739 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 740 template <
int I>
template <
typename E,
typename T>
742 #endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) 748 #if defined(ASIO_HAS_VARIABLE_TEMPLATES) 749 template <
typename T>
750 ASIO_STATIC_CONSTEXPR(
bool,
753 #endif // defined(ASIO_HAS_VARIABLE_TEMPLATES) 763 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 764 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 765 template <
typename T>
766 static ASIO_CONSTEXPR
775 template <
typename E,
typename T = decltype(never_t::static_query<E>())>
776 static ASIO_CONSTEXPR
const T static_query_v
777 = never_t::static_query<E>();
778 #endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) 786 friend ASIO_CONSTEXPR
bool operator==(
792 friend ASIO_CONSTEXPR
bool operator!=(
798 friend ASIO_CONSTEXPR
bool operator==(
804 friend ASIO_CONSTEXPR
bool operator!=(
810 friend ASIO_CONSTEXPR
bool operator==(
816 friend ASIO_CONSTEXPR
bool operator!=(
823 #if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 824 && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 825 template <
int I>
template <
typename E,
typename T>
827 #endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 834 #if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION) 835 constexpr blocking_t blocking;
836 #else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION) 837 namespace {
static const blocking_t& blocking = blocking_t::instance; }
842 #if !defined(ASIO_HAS_VARIABLE_TEMPLATES) 844 template <
typename T>
846 : integral_constant<bool,
847 execution::is_executor<T>::value
848 || execution::is_sender<T>::value
849 || execution::is_scheduler<T>::value>
853 template <
typename T>
855 : integral_constant<bool,
856 execution::is_executor<T>::value
857 || execution::is_sender<T>::value
858 || execution::is_scheduler<T>::value>
862 template <
typename T>
864 : integral_constant<bool,
865 execution::is_executor<T>::value
866 || execution::is_sender<T>::value
867 || execution::is_scheduler<T>::value>
871 template <
typename T>
873 : integral_constant<bool,
874 execution::is_executor<T>::value
875 || execution::is_sender<T>::value
876 || execution::is_scheduler<T>::value>
880 #endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES) 884 #if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT) 886 template <
typename T>
889 can_query<T, execution::blocking_t::possibly_t>::value
892 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
893 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
899 template <
typename T>
902 !can_query<T, execution::blocking_t::possibly_t>::value
903 && can_query<T, execution::blocking_t::always_t>::value
906 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
907 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
913 template <
typename T>
916 !can_query<T, execution::blocking_t::possibly_t>::value
917 && !can_query<T, execution::blocking_t::always_t>::value
918 && can_query<T, execution::blocking_t::never_t>::value
921 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
922 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
928 #endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT) 930 #if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ 931 || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) 933 template <
typename T>
936 traits::query_static_constexpr_member<T,
937 execution::blocking_t>::is_valid
940 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
941 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
946 static ASIO_CONSTEXPR result_type value()
953 template <
typename T>
956 !traits::query_static_constexpr_member<T, execution::blocking_t>::is_valid
957 && !traits::query_member<T, execution::blocking_t>::is_valid
958 && traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
961 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
962 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
967 static ASIO_CONSTEXPR result_type value()
973 template <
typename T>
976 !traits::query_static_constexpr_member<T, execution::blocking_t>::is_valid
977 && !traits::query_member<T, execution::blocking_t>::is_valid
978 && !traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
979 && traits::static_query<T, execution::blocking_t::always_t>::is_valid
982 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
983 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
988 static ASIO_CONSTEXPR result_type value()
994 template <
typename T>
997 !traits::query_static_constexpr_member<T, execution::blocking_t>::is_valid
998 && !traits::query_member<T, execution::blocking_t>::is_valid
999 && !traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
1000 && !traits::static_query<T, execution::blocking_t::always_t>::is_valid
1001 && traits::static_query<T, execution::blocking_t::never_t>::is_valid
1004 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1005 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1010 static ASIO_CONSTEXPR result_type value()
1016 template <
typename T>
1019 traits::query_static_constexpr_member<T,
1020 execution::blocking_t::possibly_t>::is_valid
1023 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1024 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1029 static ASIO_CONSTEXPR result_type value()
1036 template <
typename T>
1039 !traits::query_static_constexpr_member<T,
1040 execution::blocking_t::possibly_t>::is_valid
1041 && !traits::query_member<T, execution::blocking_t::possibly_t>::is_valid
1042 && !traits::query_free<T, execution::blocking_t::possibly_t>::is_valid
1043 && !can_query<T, execution::blocking_t::always_t>::value
1044 && !can_query<T, execution::blocking_t::never_t>::value
1047 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1048 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1052 static ASIO_CONSTEXPR result_type value()
1054 return result_type();
1058 template <
typename T>
1061 traits::query_static_constexpr_member<T,
1062 execution::blocking_t::always_t>::is_valid
1065 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1066 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1071 static ASIO_CONSTEXPR result_type value()
1078 template <
typename T>
1081 traits::query_static_constexpr_member<T,
1082 execution::blocking_t::never_t>::is_valid
1085 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1086 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1091 static ASIO_CONSTEXPR result_type value()
1098 #endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) 1101 #if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT) 1103 template <
typename T>
1106 static_query<T, execution::blocking_t::possibly_t>::is_valid
1109 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
1115 template <
typename T>
1118 static_query<T, execution::blocking_t::always_t>::is_valid
1121 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
1127 template <
typename T>
1130 static_query<T, execution::blocking_t::never_t>::is_valid
1133 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
1139 #endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT) 1141 #if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT) 1143 template <
typename T>
1146 is_same<T, typename decay<T>::type>::value
1147 && execution::is_executor<T>::value
1148 && traits::static_require<
1150 execution::detail::blocking_adaptation::allowed_t<0>
1154 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1155 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
false);
1159 #endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT) 1161 #if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT) 1163 template <
typename Executor>
1165 execution::detail::blocking::adapter<Executor> >
1167 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1168 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1171 #endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT) 1173 #if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) 1175 template <
typename Executor,
typename Function>
1177 execution::detail::blocking::adapter<Executor>, Function>
1179 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1180 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
false);
1181 typedef void result_type;
1184 #endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) 1186 #if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) 1188 template <
typename Executor,
int I>
1190 execution::detail::blocking::adapter<Executor>,
1193 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1194 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1197 static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
1199 return result_type();
1203 template <
typename Executor,
int I>
1205 execution::detail::blocking::adapter<Executor>,
1208 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1209 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1212 static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
1214 return result_type();
1218 template <
typename Executor,
int I>
1220 execution::detail::blocking::adapter<Executor>,
1223 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1224 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1227 static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
1229 return result_type();
1233 template <
typename Executor,
int I>
1235 execution::detail::blocking::adapter<Executor>,
1238 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1239 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
true);
1242 static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
1244 return result_type();
1248 #endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) 1250 #if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) 1252 template <
typename Executor,
typename Property>
1254 execution::detail::blocking::adapter<Executor>, Property,
1256 can_query<const Executor&, Property>::value
1259 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1260 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
1262 typedef typename query_result<Executor, Property>::type result_type;
1265 #endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) 1267 #if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) 1269 template <
typename Executor,
int I>
1271 execution::detail::blocking::adapter<Executor>,
1276 execution::detail::blocking::possibly_t<I>
1280 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1281 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
1288 template <
typename Executor,
int I>
1290 execution::detail::blocking::adapter<Executor>,
1295 execution::detail::blocking::never_t<I>
1299 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1300 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
1307 template <
typename Executor,
typename Property>
1309 execution::detail::blocking::adapter<Executor>, Property,
1311 can_require<const Executor&, Property>::value
1314 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1315 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
1318 typename require_result<Executor, Property>::type
1322 #endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) 1324 #if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) 1326 template <
typename Executor,
typename Property>
1328 execution::detail::blocking::adapter<Executor>, Property,
1330 can_prefer<const Executor&, Property>::value
1333 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
1334 ASIO_STATIC_CONSTEXPR(
bool, is_noexcept =
1337 typename prefer_result<Executor, Property>::type
1341 #endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) 1345 #endif // defined(GENERATING_DOCUMENTATION) 1349 #include "asio/detail/pop_options.hpp" 1351 #endif // ASIO_EXECUTION_BLOCKING_HPP Definition: static_require.hpp:37
Definition: prefer.hpp:574
Definition: require.hpp:491
Definition: any_executor.hpp:249
Definition: blocking.hpp:198
Definition: prefer_member.hpp:38
Definition: blocking.hpp:208
Definition: require_free.hpp:35
Definition: query.hpp:269
The is_scheduler trait detects whether a type T satisfies the execution::scheduler concept...
Definition: scheduler.hpp:48
The is_sender trait detects whether a type T satisfies the execution::sender concept.
Definition: sender.hpp:183
Definition: blocking.hpp:193
Definition: execute.hpp:243
Definition: blocking.hpp:191
Definition: query_member.hpp:38
Definition: static_query.hpp:42
Definition: execute_member.hpp:38
Definition: blocking.hpp:317
Definition: require.hpp:442
Definition: type_traits.hpp:97
Definition: require_member.hpp:38
Definition: query.hpp:253
Definition: require.hpp:390
Definition: query_free.hpp:35
Definition: query_free.hpp:38
Definition: query_static_constexpr_member.hpp:42
Definition: any_executor.hpp:256
Definition: blocking.hpp:192
Definition: handler_work.hpp:37
Definition: prefer.hpp:522
Definition: is_applicable_property.hpp:46
Definition: blocking.hpp:516
Definition: any_io_executor.hpp:28
Definition: equality_comparable.hpp:36
The is_executor trait detects whether a type T satisfies the execution::executor concept.
Definition: executor.hpp:109