The name stopped_as_error denotes a pipeable sender adaptor object.
For some subexpressions sndr and err,
let Sndr be decltype((sndr)) and
let Err be decltype((err)).
If the type Sndr does not satisfy sender or
if the type Err does not satisfy movable-value,
stopped_as_error(sndr, err) is ill-formed.
Otherwise, the expression stopped_as_error(sndr, err)
is expression-equivalent to:
transform_sender(get-domain-early(sndr), make-sender(stopped_as_error, err, sndr))
except that sndr is only evaluated once.
Let sndr and env be subexpressions
such that Sndr is decltype((sndr)) and
Env is decltype((env)).
If sender-for<Sndr, stopped_as_error_t> is false,
then the expression stopped_as_error.transform_sender(sndr, env)
is ill-formed;
otherwise, it is equivalent to:
auto&&[_, err, child]= sndr;
using E =decltype(auto(err));
return let_stopped(
std::forward_like<Sndr>(child),
[err = std::forward_like<Sndr>(err)]()mutablenoexcept(is_nothrow_move_constructible_v<E>){return just_error(std::move(err));
});