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))); }; }; template<class Sndr, class Env> static consteval void check-types(); }
template<class Sndr, class Env> static consteval void check-types();
Let Q be decay_t<data-type<Sndr>>.
Throws: An exception of an unspecified type derived from exception if the expression Q()(env) is ill-formed or has type void, where env is an lvalue subexpression whose type is Env.