tmp/tmpkrkub3v3/{from.md → to.md}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
| 1 |
-
##
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [execpol.type], execution policy type trait
|
| 6 |
-
template<class T> struct is_execution_policy;
|
| 7 |
-
template<class T> constexpr bool is_execution_policy_v =
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
namespace std::execution {
|
| 11 |
// [execpol.seq], sequenced execution policy
|
| 12 |
class sequenced_policy;
|
|
@@ -24,7 +25,392 @@ namespace std::execution {
|
|
| 24 |
inline constexpr sequenced_policy seq{ unspecified };
|
| 25 |
inline constexpr parallel_policy par{ unspecified };
|
| 26 |
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified };
|
| 27 |
inline constexpr unsequenced_policy unseq{ unspecified };
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
```
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Header `<execution>` synopsis <a id="execution.syn">[[execution.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [execpol.type], execution policy type trait
|
| 6 |
+
template<class T> struct is_execution_policy; // freestanding
|
| 7 |
+
template<class T> constexpr bool is_execution_policy_v = // freestanding
|
| 8 |
+
is_execution_policy<T>::value;
|
| 9 |
}
|
| 10 |
|
| 11 |
namespace std::execution {
|
| 12 |
// [execpol.seq], sequenced execution policy
|
| 13 |
class sequenced_policy;
|
|
|
|
| 25 |
inline constexpr sequenced_policy seq{ unspecified };
|
| 26 |
inline constexpr parallel_policy par{ unspecified };
|
| 27 |
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified };
|
| 28 |
inline constexpr unsequenced_policy unseq{ unspecified };
|
| 29 |
}
|
| 30 |
+
|
| 31 |
+
namespace std {
|
| 32 |
+
// [exec.general], helper concepts
|
| 33 |
+
template<class T>
|
| 34 |
+
concept exposition onlyconceptnc{movable-value} = see belownc; // exposition only
|
| 35 |
+
|
| 36 |
+
template<class From, class To>
|
| 37 |
+
concept decays-to = same_as<decay_t<From>, To>; // exposition only
|
| 38 |
+
|
| 39 |
+
template<class T>
|
| 40 |
+
concept class-type = exposition onlyconceptnc{decays-to}<T, T> && is_class_v<T>; // exposition only
|
| 41 |
+
|
| 42 |
+
// [exec.queryable], queryable objects
|
| 43 |
+
template<class T>
|
| 44 |
+
concept exposition onlyconceptnc{queryable} = see belownc; // exposition only
|
| 45 |
+
|
| 46 |
+
// [exec.queries], queries
|
| 47 |
+
struct forwarding_query_t { unspecified };
|
| 48 |
+
struct get_allocator_t { unspecified };
|
| 49 |
+
struct get_stop_token_t { unspecified };
|
| 50 |
+
|
| 51 |
+
inline constexpr forwarding_query_t forwarding_query{};
|
| 52 |
+
inline constexpr get_allocator_t get_allocator{};
|
| 53 |
+
inline constexpr get_stop_token_t get_stop_token{};
|
| 54 |
+
|
| 55 |
+
template<class T>
|
| 56 |
+
using stop_token_of_t = remove_cvref_t<decltype(get_stop_token(declval<T>()))>;
|
| 57 |
+
|
| 58 |
+
template<class T>
|
| 59 |
+
concept forwarding-query = forwarding_query(T{}); // exposition only
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
namespace std::execution {
|
| 63 |
+
// [exec.queries], queries
|
| 64 |
+
struct get_domain_t { unspecified };
|
| 65 |
+
struct get_scheduler_t { unspecified };
|
| 66 |
+
struct get_delegation_scheduler_t { unspecified };
|
| 67 |
+
struct get_forward_progress_guarantee_t { unspecified };
|
| 68 |
+
template<class CPO>
|
| 69 |
+
struct get_completion_scheduler_t { unspecified };
|
| 70 |
+
struct get_await_completion_adaptor_t { unspecified };
|
| 71 |
+
|
| 72 |
+
inline constexpr get_domain_t get_domain{};
|
| 73 |
+
inline constexpr get_scheduler_t get_scheduler{};
|
| 74 |
+
inline constexpr get_delegation_scheduler_t get_delegation_scheduler{};
|
| 75 |
+
enum class forward_progress_guarantee;
|
| 76 |
+
inline constexpr get_forward_progress_guarantee_t get_forward_progress_guarantee{};
|
| 77 |
+
template<class CPO>
|
| 78 |
+
constexpr get_completion_scheduler_t<CPO> get_completion_scheduler{};
|
| 79 |
+
inline constexpr get_await_completion_adaptor_t get_await_completion_adaptor{};
|
| 80 |
+
|
| 81 |
+
struct get_env_t { unspecified };
|
| 82 |
+
inline constexpr get_env_t get_env{};
|
| 83 |
+
|
| 84 |
+
template<class T>
|
| 85 |
+
using env_of_t = decltype(get_env(declval<T>()));
|
| 86 |
+
|
| 87 |
+
// [exec.domain.default], execution domains
|
| 88 |
+
struct default_domain;
|
| 89 |
+
|
| 90 |
+
// [exec.sched], schedulers
|
| 91 |
+
struct scheduler_t {};
|
| 92 |
+
|
| 93 |
+
template<class Sch>
|
| 94 |
+
concept scheduler = see below;
|
| 95 |
+
|
| 96 |
+
// [exec.recv], receivers
|
| 97 |
+
struct receiver_t {};
|
| 98 |
+
|
| 99 |
+
template<class Rcvr>
|
| 100 |
+
concept receiver = see below;
|
| 101 |
+
|
| 102 |
+
template<class Rcvr, class Completions>
|
| 103 |
+
concept receiver_of = see below;
|
| 104 |
+
|
| 105 |
+
struct set_value_t { unspecified };
|
| 106 |
+
struct set_error_t { unspecified };
|
| 107 |
+
struct set_stopped_t { unspecified };
|
| 108 |
+
|
| 109 |
+
inline constexpr set_value_t set_value{};
|
| 110 |
+
inline constexpr set_error_t set_error{};
|
| 111 |
+
inline constexpr set_stopped_t set_stopped{};
|
| 112 |
+
|
| 113 |
+
// [exec.opstate], operation states
|
| 114 |
+
struct operation_state_t {};
|
| 115 |
+
|
| 116 |
+
template<class O>
|
| 117 |
+
concept operation_state = see below;
|
| 118 |
+
|
| 119 |
+
struct start_t;
|
| 120 |
+
inline constexpr start_t start{};
|
| 121 |
+
|
| 122 |
+
// [exec.snd], senders
|
| 123 |
+
struct sender_t {};
|
| 124 |
+
|
| 125 |
+
template<class Sndr>
|
| 126 |
+
inline constexpr bool enable_sender = see below;
|
| 127 |
+
|
| 128 |
+
template<class Sndr>
|
| 129 |
+
concept sender = see below;
|
| 130 |
+
|
| 131 |
+
template<class Sndr, class... Env>
|
| 132 |
+
concept sender_in = see below;
|
| 133 |
+
|
| 134 |
+
template<class Sndr>
|
| 135 |
+
concept dependent_sender = see below;
|
| 136 |
+
|
| 137 |
+
template<class Sndr, class Rcvr>
|
| 138 |
+
concept sender_to = see below;
|
| 139 |
+
|
| 140 |
+
template<class... Ts>
|
| 141 |
+
struct type-list; // exposition only
|
| 142 |
+
|
| 143 |
+
template<class... Ts>
|
| 144 |
+
using decayed-tuple = tuple<decay_t<Ts>...>; // exposition only
|
| 145 |
+
|
| 146 |
+
template<class... Ts>
|
| 147 |
+
using variant-or-empty = see belownc; // exposition only
|
| 148 |
+
|
| 149 |
+
template<class Sndr, class Env = env<>,
|
| 150 |
+
template<class...> class Tuple = decayed-tuple,
|
| 151 |
+
template<class...> class Variant = variant-or-empty>
|
| 152 |
+
requires sender_in<Sndr, Env>
|
| 153 |
+
using value_types_of_t = see below;
|
| 154 |
+
|
| 155 |
+
template<class Sndr, class Env = env<>,
|
| 156 |
+
template<class...> class Variant = variant-or-empty>
|
| 157 |
+
requires sender_in<Sndr, Env>
|
| 158 |
+
using error_types_of_t = see below;
|
| 159 |
+
|
| 160 |
+
template<class Sndr, class Env = env<>>
|
| 161 |
+
requires sender_in<Sndr, Env>
|
| 162 |
+
constexpr bool sends_stopped = see below;
|
| 163 |
+
|
| 164 |
+
template<class Sndr, class... Env>
|
| 165 |
+
using single-sender-value-type = see belownc; // exposition only
|
| 166 |
+
|
| 167 |
+
template<class Sndr, class... Env>
|
| 168 |
+
concept single-sender = see below; // exposition only
|
| 169 |
+
|
| 170 |
+
template<sender Sndr>
|
| 171 |
+
using tag_of_t = see below;
|
| 172 |
+
|
| 173 |
+
// [exec.snd.transform], sender transformations
|
| 174 |
+
template<class Domain, sender Sndr, queryable... Env>
|
| 175 |
+
requires (sizeof...(Env) <= 1)
|
| 176 |
+
constexpr sender decltype(auto) transform_sender(
|
| 177 |
+
Domain dom, Sndr&& sndr, const Env&... env) noexcept(see below);
|
| 178 |
+
|
| 179 |
+
// [exec.snd.transform.env], environment transformations
|
| 180 |
+
template<class Domain, sender Sndr, queryable Env>
|
| 181 |
+
constexpr queryable decltype(auto) transform_env(
|
| 182 |
+
Domain dom, Sndr&& sndr, Env&& env) noexcept;
|
| 183 |
+
|
| 184 |
+
// [exec.snd.apply], sender algorithm application
|
| 185 |
+
template<class Domain, class Tag, sender Sndr, class... Args>
|
| 186 |
+
constexpr decltype(auto) apply_sender(
|
| 187 |
+
Domain dom, Tag, Sndr&& sndr, Args&&... args) noexcept(see below);
|
| 188 |
+
|
| 189 |
+
// [exec.getcomplsigs], get completion signatures
|
| 190 |
+
template<class Sndr, class... Env>
|
| 191 |
+
consteval auto get_completion_signatures() -> valid-completion-signatures auto;
|
| 192 |
+
|
| 193 |
+
template<class Sndr, class... Env>
|
| 194 |
+
requires sender_in<Sndr, Env...>
|
| 195 |
+
using completion_signatures_of_t = decltype(get_completion_signatures<Sndr, Env...>());
|
| 196 |
+
|
| 197 |
+
// [exec.connect], the connect sender algorithm
|
| 198 |
+
struct connect_t;
|
| 199 |
+
inline constexpr connect_t connect{};
|
| 200 |
+
|
| 201 |
+
template<class Sndr, class Rcvr>
|
| 202 |
+
using connect_result_t =
|
| 203 |
+
decltype(connect(declval<Sndr>(), declval<Rcvr>()));
|
| 204 |
+
|
| 205 |
+
// [exec.factories], sender factories
|
| 206 |
+
struct just_t { unspecified };
|
| 207 |
+
struct just_error_t { unspecified };
|
| 208 |
+
struct just_stopped_t { unspecified };
|
| 209 |
+
struct schedule_t { unspecified };
|
| 210 |
+
|
| 211 |
+
inline constexpr just_t just{};
|
| 212 |
+
inline constexpr just_error_t just_error{};
|
| 213 |
+
inline constexpr just_stopped_t just_stopped{};
|
| 214 |
+
inline constexpr schedule_t schedule{};
|
| 215 |
+
inline constexpr unspecified read_env{};
|
| 216 |
+
|
| 217 |
+
template<scheduler Sch>
|
| 218 |
+
using schedule_result_t = decltype(schedule(declval<Sch>()));
|
| 219 |
+
|
| 220 |
+
// [exec.adapt], sender adaptors
|
| 221 |
+
template<class-type D>
|
| 222 |
+
struct sender_adaptor_closure { };
|
| 223 |
+
|
| 224 |
+
struct starts_on_t { unspecified };
|
| 225 |
+
struct continues_on_t { unspecified };
|
| 226 |
+
struct on_t { unspecified };
|
| 227 |
+
struct schedule_from_t { unspecified };
|
| 228 |
+
struct then_t { unspecified };
|
| 229 |
+
struct upon_error_t { unspecified };
|
| 230 |
+
struct upon_stopped_t { unspecified };
|
| 231 |
+
struct let_value_t { unspecified };
|
| 232 |
+
struct let_error_t { unspecified };
|
| 233 |
+
struct let_stopped_t { unspecified };
|
| 234 |
+
struct bulk_t { unspecified };
|
| 235 |
+
struct bulk_chunked_t { unspecified };
|
| 236 |
+
struct bulk_unchunked_t { unspecified };
|
| 237 |
+
struct when_all_t { unspecified };
|
| 238 |
+
struct when_all_with_variant_t { unspecified };
|
| 239 |
+
struct into_variant_t { unspecified };
|
| 240 |
+
struct stopped_as_optional_t { unspecified };
|
| 241 |
+
struct stopped_as_error_t { unspecified };
|
| 242 |
+
struct associate_t { unspecified };
|
| 243 |
+
struct spawn_future_t { unspecified };
|
| 244 |
+
|
| 245 |
+
inline constexpr unspecified write_env{};
|
| 246 |
+
inline constexpr unspecified unstoppable{};
|
| 247 |
+
inline constexpr starts_on_t starts_on{};
|
| 248 |
+
inline constexpr continues_on_t continues_on{};
|
| 249 |
+
inline constexpr on_t on{};
|
| 250 |
+
inline constexpr schedule_from_t schedule_from{};
|
| 251 |
+
inline constexpr then_t then{};
|
| 252 |
+
inline constexpr upon_error_t upon_error{};
|
| 253 |
+
inline constexpr upon_stopped_t upon_stopped{};
|
| 254 |
+
inline constexpr let_value_t let_value{};
|
| 255 |
+
inline constexpr let_error_t let_error{};
|
| 256 |
+
inline constexpr let_stopped_t let_stopped{};
|
| 257 |
+
inline constexpr bulk_t bulk{};
|
| 258 |
+
inline constexpr bulk_chunked_t bulk_chunked{};
|
| 259 |
+
inline constexpr bulk_unchunked_t bulk_unchunked{};
|
| 260 |
+
inline constexpr when_all_t when_all{};
|
| 261 |
+
inline constexpr when_all_with_variant_t when_all_with_variant{};
|
| 262 |
+
inline constexpr into_variant_t into_variant{};
|
| 263 |
+
inline constexpr stopped_as_optional_t stopped_as_optional{};
|
| 264 |
+
inline constexpr stopped_as_error_t stopped_as_error{};
|
| 265 |
+
inline constexpr associate_t associate{};
|
| 266 |
+
inline constexpr spawn_future_t spawn_future{};
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
namespace std::this_thread {
|
| 270 |
+
// [exec.consumers], consumers
|
| 271 |
+
struct sync_wait_t { unspecified };
|
| 272 |
+
struct sync_wait_with_variant_t { unspecified };
|
| 273 |
+
|
| 274 |
+
inline constexpr sync_wait_t sync_wait{};
|
| 275 |
+
inline constexpr sync_wait_with_variant_t sync_wait_with_variant{};
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
namespace std::execution {
|
| 279 |
+
// [exec.consumers], consumers
|
| 280 |
+
struct spawn_t { unspecified };
|
| 281 |
+
inline constexpr spawn_t spawn{};
|
| 282 |
+
|
| 283 |
+
// [exec.cmplsig], completion signatures
|
| 284 |
+
template<class Fn>
|
| 285 |
+
concept exposition onlyconceptnc{completion-signature} = see belownc; // exposition only
|
| 286 |
+
|
| 287 |
+
template<completion-signature... Fns>
|
| 288 |
+
struct completion_signatures;
|
| 289 |
+
|
| 290 |
+
template<class Sigs>
|
| 291 |
+
concept exposition onlyconceptnc{valid-completion-signatures} = see belownc; // exposition only
|
| 292 |
+
|
| 293 |
+
struct dependent_sender_error : exception {};
|
| 294 |
+
|
| 295 |
+
// [exec.prop], class template prop
|
| 296 |
+
template<class QueryTag, class ValueType>
|
| 297 |
+
struct prop;
|
| 298 |
+
|
| 299 |
+
// [exec.env], class template env
|
| 300 |
+
template<queryable... Envs>
|
| 301 |
+
struct env;
|
| 302 |
+
|
| 303 |
+
// [exec.run.loop], run_loop
|
| 304 |
+
class run_loop;
|
| 305 |
+
|
| 306 |
+
// [exec.as.awaitable], coroutine utility as_awaitable
|
| 307 |
+
struct as_awaitable_t { unspecified };
|
| 308 |
+
inline constexpr as_awaitable_t as_awaitable{};
|
| 309 |
+
|
| 310 |
+
// [exec.with.awaitable.senders], coroutine utility with_awaitable_senders
|
| 311 |
+
template<class-type Promise>
|
| 312 |
+
struct with_awaitable_senders;
|
| 313 |
+
|
| 314 |
+
// [exec.affine.on], coroutine utility affine_on
|
| 315 |
+
struct affine_on_t { unspecified };
|
| 316 |
+
inline constexpr affine_on_t affine_on{};
|
| 317 |
+
|
| 318 |
+
// [exec.inline.scheduler], inline scheduler
|
| 319 |
+
class inline_scheduler;
|
| 320 |
+
|
| 321 |
+
// [exec.task.scheduler], task scheduler
|
| 322 |
+
class task_scheduler;
|
| 323 |
+
|
| 324 |
+
template<class E>
|
| 325 |
+
struct with_error {
|
| 326 |
+
using type = remove_cvref_t<E>;
|
| 327 |
+
type error;
|
| 328 |
+
};
|
| 329 |
+
template<class E>
|
| 330 |
+
with_error(E) -> with_error<E>;
|
| 331 |
+
|
| 332 |
+
template<scheduler Sch>
|
| 333 |
+
struct change_coroutine_scheduler {
|
| 334 |
+
using type = remove_cvref_t<Sch>;
|
| 335 |
+
type scheduler;
|
| 336 |
+
};
|
| 337 |
+
template<scheduler Sch>
|
| 338 |
+
change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>;
|
| 339 |
+
|
| 340 |
+
// [exec.task], class template task
|
| 341 |
+
template<class T, class Environment>
|
| 342 |
+
class task;
|
| 343 |
+
|
| 344 |
+
// [exec.scope.concepts], scope concepts
|
| 345 |
+
template<class Token>
|
| 346 |
+
concept scope_token = see below;
|
| 347 |
+
|
| 348 |
+
// [exec.scope.simple.counting], simple counting scope
|
| 349 |
+
class simple_counting_scope;
|
| 350 |
+
|
| 351 |
+
// [exec.scope.counting], counting scope
|
| 352 |
+
class counting_scope;
|
| 353 |
+
|
| 354 |
+
// [exec.par.scheduler], parallel scheduler
|
| 355 |
+
class parallel_scheduler;
|
| 356 |
+
parallel_scheduler get_parallel_scheduler();
|
| 357 |
+
|
| 358 |
+
// [exec.sysctxrepl], namespace system_context_replaceability
|
| 359 |
+
namespace system_context_replaceability@ {
|
| 360 |
+
struct receiver_proxy;
|
| 361 |
+
struct bulk_item_receiver_proxy;
|
| 362 |
+
struct parallel_scheduler_backend;
|
| 363 |
+
|
| 364 |
+
shared_ptr<parallel_scheduler_backend> query_parallel_scheduler_backend();
|
| 365 |
+
}
|
| 366 |
+
}
|
| 367 |
+
```
|
| 368 |
+
|
| 369 |
+
The exposition-only type `variant-or-empty<Ts...>` is defined as
|
| 370 |
+
follows:
|
| 371 |
+
|
| 372 |
+
- If `sizeof...(Ts)` is greater than zero, `variant-or-empty<Ts...>`
|
| 373 |
+
denotes `variant<Us...>` where `Us...` is the pack `decay_t<Ts>...`
|
| 374 |
+
with duplicate types removed.
|
| 375 |
+
- Otherwise, `variant-or-empty<Ts...>` denotes the exposition-only class
|
| 376 |
+
type:
|
| 377 |
+
``` cpp
|
| 378 |
+
namespace std::execution {
|
| 379 |
+
struct empty-variant { // exposition only
|
| 380 |
+
empty-variant() = delete;
|
| 381 |
+
};
|
| 382 |
+
}
|
| 383 |
+
```
|
| 384 |
+
|
| 385 |
+
For type `Sndr` and pack of types `Env`, let `CS` be
|
| 386 |
+
`completion_signatures_of_t<Sndr, Env...>`. Then
|
| 387 |
+
`single-sender-value-type<Sndr, Env...>` is ill-formed if `CS` is
|
| 388 |
+
ill-formed or if `sizeof...(Env) > 1` is `true`; otherwise, it is an
|
| 389 |
+
alias for:
|
| 390 |
+
|
| 391 |
+
- `gather-signatures<set_value_t, CS, decay_t, type_identity_t>` if that
|
| 392 |
+
type is well-formed,
|
| 393 |
+
- Otherwise, `void` if
|
| 394 |
+
`gather-signatures<set_value_t, CS, tuple, variant>` is
|
| 395 |
+
`variant<tuple<>>` or `variant<>`,
|
| 396 |
+
- Otherwise,
|
| 397 |
+
`gather-signatures<set_value_t, CS, decayed-tuple, type_identity_t>`
|
| 398 |
+
if that type is well-formed,
|
| 399 |
+
- Otherwise, `single-sender-value-type<Sndr, Env...>` is ill-formed.
|
| 400 |
+
|
| 401 |
+
The exposition-only concept `single-sender` is defined as follows:
|
| 402 |
+
|
| 403 |
+
``` cpp
|
| 404 |
+
namespace std::execution {
|
| 405 |
+
template<class Sndr, class... Env>
|
| 406 |
+
concept single-sender = sender_in<Sndr, Env...> &&
|
| 407 |
+
requires {
|
| 408 |
+
typename single-sender-value-type<Sndr, Env...>;
|
| 409 |
+
};
|
| 410 |
+
}
|
| 411 |
```
|
| 412 |
|
| 413 |
+
A type satisfies and models the exposition-only concept
|
| 414 |
+
*valid-completion-signatures* if it is a specialization of the
|
| 415 |
+
`completion_signatures` class template.
|
| 416 |
+
|