tmp/tmpucuzzt04/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### `execution::just`, `execution::just_error`, `execution::just_stopped` <a id="exec.just">[[exec.just]]</a>
|
| 2 |
+
|
| 3 |
+
`just`, `just_error`, and `just_stopped` are sender factories whose
|
| 4 |
+
asynchronous operations complete synchronously in their start operation
|
| 5 |
+
with a value completion operation, an error completion operation, or a
|
| 6 |
+
stopped completion operation, respectively.
|
| 7 |
+
|
| 8 |
+
The names `just`, `just_error`, and `just_stopped` denote customization
|
| 9 |
+
point objects. Let *`just-cpo`* be one of `just`, `just_error`, or
|
| 10 |
+
`just_stopped`. For a pack of subexpressions `ts`, let `Ts` be the pack
|
| 11 |
+
of types `decltype((ts))`. The expression `just-cpo(ts...)` is
|
| 12 |
+
ill-formed if
|
| 13 |
+
|
| 14 |
+
- `(movable-value<Ts> &&...)` is `false`, or
|
| 15 |
+
- *`just-cpo`* is `just_error` and `sizeof...(ts) == 1` is `false`, or
|
| 16 |
+
- *`just-cpo`* is `just_stopped` and `sizeof...(ts) == 0` is `false`.
|
| 17 |
+
|
| 18 |
+
Otherwise, it is expression-equivalent to
|
| 19 |
+
`make-sender(just-cpo, product-type{ts...})`.
|
| 20 |
+
|
| 21 |
+
For `just`, `just_error`, and `just_stopped`, let *`set-cpo`* be
|
| 22 |
+
`set_value`, `set_error`, and `set_stopped`, respectively. The
|
| 23 |
+
exposition-only class template *`impls-for`* [[exec.snd.expos]] is
|
| 24 |
+
specialized for *`just-cpo`* as follows:
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
namespace std::execution {
|
| 28 |
+
template<>
|
| 29 |
+
struct impls-for<decayed-typeof<just-cpo>> : default-impls {
|
| 30 |
+
static constexpr auto start =
|
| 31 |
+
[](auto& state, auto& rcvr) noexcept -> void {
|
| 32 |
+
auto& [...ts] = state;
|
| 33 |
+
set-cpo(std::move(rcvr), std::move(ts)...);
|
| 34 |
+
};
|
| 35 |
+
};
|
| 36 |
+
}
|
| 37 |
+
```
|
| 38 |
+
|