Open
Description
The current specification for the exposition-only class basic-receiver
defines its completion-functions to be constrained based on whether the impls-for<tag-t>::complete
function is invocable.
For example:
template<class Sndr, class Rcvr, class Index>
requires valid-specialization<env-type, Index, Sndr, Rcvr>
struct basic-receiver { // exposition only
using receiver_concept = receiver_t;
using tag-t = tag_of_t<Sndr>; // exposition only
using state-t = state-type<Sndr, Rcvr>; // exposition only
static constexpr const auto& complete = impls-for<tag-t>::complete; // exposition only
template<class... Args>
requires callable<decltype(complete), Index, state-t&, Rcvr&, set_value_t, Args...>
void set_value(Args&&... args) && noexcept {
complete(Index(), op->state, op->rcvr, set_value_t(), std::forward<Args>(args)...);
}
// ...
basic-state<Sndr, Rcvr>* op; // exposition only
};
Since a sender/operation is not allowed to form a call to set_value unless that completion-signature is listed in its set of completion-signatures, shouldn't we be using mandates instead of constraints here?
Is there any benefit to putting the constraints/requires-clause on the set_value/set_error/set_stopped functions?