[exec.read.env] (original) (raw)
33 Execution control library [exec]
33.9 Senders [exec.snd]
33.9.11 Sender factories [exec.factories]
33.9.11.3 execution​::​read_env [exec.read.env]
read_env is a sender factory for a sender whose asynchronous operation completes synchronously in its start operation with a value completion result equal to a value read from the receiver's associated environment.
read_env is a customization point object.
For some query object q, the expression read_env(q) is expression-equivalent to_make-sender_(read_env, q).
The exposition-only class template impls-for ([exec.snd.general]) is specialized for read_env as follows:namespace std::execution { template<> struct impls-for<_decayed-typeof_<read_env>> : default-impls { static constexpr auto start = [](auto query, auto& rcvr) noexcept -> void { TRY-SET-VALUE(rcvr, query(get_env(rcvr)));};};}