You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the get_env CPO itself already mandates that the result of the get_env call satisfies queryable, so the additional check in the receiver concept for this seems redundant.
Can we simplify the receiver concept to just check that get_env(rcvr) is valid?
Note that #321 is also exploring whether we need to check get_env(rcvr) at all, since it has an unconstrained fallback overload that should match any receiver.
Further, the requires clause could be simplified from requires(const remove_cvref_t<Rcvr>& rcvr) to just requires(const Rcvr& rcvr) as reference-collapsing will result in the same parameter type.
And the derived_from constraint could be simplified to use remove_ref_t instead of remove_cvref_t when computing the receiver_concept type as the cv-qualification does not need to be stripped to get access to the ::receiver_concept member.
Activity
lewissbaker commentedon Feb 3, 2025
Further, the requires clause could be simplified from
requires(const remove_cvref_t<Rcvr>& rcvr)
to justrequires(const Rcvr& rcvr)
as reference-collapsing will result in the same parameter type.And the
derived_from
constraint could be simplified to useremove_ref_t
instead ofremove_cvref_t
when computing thereceiver_concept
type as the cv-qualification does not need to be stripped to get access to the::receiver_concept
member.lewissbaker commentedon Feb 4, 2025
I suggest simplifying the receiver concept to:
and similarly, simplifying the
sender
concept to: