tmp/tmp3rvb7_pn/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### `execution::read_env` <a id="exec.read.env">[[exec.read.env]]</a>
|
| 2 |
+
|
| 3 |
+
`read_env` is a sender factory for a sender whose asynchronous operation
|
| 4 |
+
completes synchronously in its start operation with a value completion
|
| 5 |
+
result equal to a value read from the receiver’s associated environment.
|
| 6 |
+
|
| 7 |
+
`read_env` is a customization point object. For some query object `q`,
|
| 8 |
+
the expression `read_env(q)` is expression-equivalent to
|
| 9 |
+
`make-sender(read_env, q)`.
|
| 10 |
+
|
| 11 |
+
The exposition-only class template *`impls-for`* [[exec.snd.expos]] is
|
| 12 |
+
specialized for `read_env` as follows:
|
| 13 |
+
|
| 14 |
+
``` cpp
|
| 15 |
+
namespace std::execution {
|
| 16 |
+
template<>
|
| 17 |
+
struct impls-for<decayed-typeof<read_env>> : default-impls {
|
| 18 |
+
static constexpr auto start =
|
| 19 |
+
[](auto query, auto& rcvr) noexcept -> void {
|
| 20 |
+
TRY-SET-VALUE(rcvr, query(get_env(rcvr)));
|
| 21 |
+
};
|
| 22 |
+
};
|
| 23 |
+
|
| 24 |
+
template<class Sndr, class Env>
|
| 25 |
+
static consteval void check-types();
|
| 26 |
+
}
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
``` cpp
|
| 30 |
+
template<class Sndr, class Env>
|
| 31 |
+
static consteval void check-types();
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Let `Q` be `decay_t<`*`data-type`*`<Sndr>>`.
|
| 35 |
+
|
| 36 |
+
*Throws:* An exception of an unspecified type derived from `exception`
|
| 37 |
+
if the expression `Q()(env)` is ill-formed or has type `void`, where
|
| 38 |
+
`env` is an lvalue subexpression whose type is `Env`.
|
| 39 |
+
|