Difference between revisions of "cpp/execution/just stopped"
From cppreference.com
m (fmt) |
(update to standard (huh, the whole expression-equivalent paragraph evaporates because sizeof(ts...) must be zero) |
||
Line 2: | Line 2: | ||
{{cpp/execution/navbar}} | {{cpp/execution/navbar}} | ||
− | {{ddcl|since=c++26|header=execution| | + | {{ddcl|since=c++26|header=execution|notes={{mark custpt}}| |
− | + | inline constexpr just_stopped_t just_stopped{}; | |
+ | struct just_stopped_t { /*unspecified*/ }; | ||
}} | }} | ||
− | + | A sender factory that returns a sender that which completes immediately by calling the receiver’s {{rlpf|set_stopped}}. | |
− | ( | + | |
+ | For any query object {{tt|q}}, the expression {{c|read_env(q)}} is {{c|/*make-sender*/(read_env, q)}}. | ||
+ | |||
+ | The expression {[c|just_stopped()}} is [[cpp/language/expressions#Expression-equivalence|expression-equivalent]] to {{lc|/*make-sender*/(just_stopped)*/ | ||
− | |||
− | |||
===Example=== | ===Example=== |
Revision as of 14:43, 4 October 2024
Defined in header <execution>
|
||
inline constexpr just_stopped_t just_stopped{}; struct just_stopped_t { /*unspecified*/ }; |
(since C++26) (customization point object) |
|
A sender factory that returns a sender that which completes immediately by calling the receiver’s set_stopped()
.
For any query object q
, the expression read_env(q) is /*make-sender*/(read_env, q).
The expression {[c|just_stopped()}} is expression-equivalent to {{lc|/*make-sender*/(just_stopped)*/
Example
This section is incomplete Reason: no example |