#
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.
2
#
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.expos]) 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();
Throws: An exception of type unspecified-exception ([exec.snd.general]) if the expression Q()(env) is ill-formed or has type void, where env is an lvalue subexpression whose type is Env.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant