If
sender-for<Sndr, stopped_as_optional_t>
is
false
then the expression
stopped_as_optional.transform_sender(sndr, env)
is ill-formed;
otherwise,
if
sender_in<child-type<Sndr>, FWD-ENV-T(Env)>
is
false,
the expression
stopped_as_optional.transform_sender(sndr, env)
is equivalent to
not-a-sender();
otherwise, it is equivalent to:
auto&& [_, _, child] = sndr;
using V = single-sender-value-type<child-type<Sndr>, FWD-ENV-T(Env)>;
return let_stopped(
then(std::forward_like<Sndr>(child),
[]<class... Ts>(Ts&&... ts) noexcept(is_nothrow_constructible_v<V, Ts...>) {
return optional<V>(in_place, std::forward<Ts>(ts)...);
}),
[]() noexcept { return just(optional<V>()); });