33 Execution control library [exec]

33.9 Senders [exec.snd]

33.9.7 execution​::​transform_sender [exec.snd.transform]

namespace std::execution { template<sender Sndr, queryable Env> constexpr decltype(auto) transform_sender(Sndr&& sndr, const Env& env) noexcept(see below); }
For a subexpression s, let start-domain be D() where D is the decayed type of get_domain(env) if that expression is well-formed, and default_domain otherwise.
Let completion-domain(s) be D() where D is the decayed type of get_completion_domain<>(get_env(s), env) if that is well-formed; otherwise, D is default_domain.
Let transformed-sndr(dom, tag, s) be the expression dom.transform_sender(tag, s, env) if that expression is well-formed; otherwise, default_domain().transform_sender(tag, s, env)
Let transform-recurse(dom, tag, s) be the expression transformed-sndr(dom, tag, s) if
transformed-sndr(dom, tag, s) and s have the same type ignoring cv-qualifiers; otherwise, it is the expression transform-recurse(dom2, tag2, s2), where s2 is transformed-sender(dom, tag, s) and dom2 is start-domain if tag is start, and completion-domain(s2) otherwise.
Let tmp-sndr be the expression transform-recurse(completion-domain(sndr), set_value, sndr) and let final-sndr be the expression transform-recurse(start-domain, start, tmp-sndr)
Returns: final-sndr.
Remarks: The exception specification is equivalent to noexcept(final-sndr).