-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
get_domain(sch) returns the domain tag of sch's associated execution context. so too does get_domain(get_env(schedule(sch))). nothing is currently requiring them to have the same type.
Proposed resolution
Change the scheduler concept as follows:
namespace std::execution {
template<class Env>
using domain-of-t = // exposition only
decltype(auto(query-with-default(get_domain, declval<Env>(), default_domain())));
template<class Sch>
concept scheduler =
derived_from<typename remove_cvref_t<Sch>::scheduler_concept, scheduler_t> &&
queryable<Sch> &&
requires(Sch&& sch) {
{ schedule(std::forward<Sch>(sch)) } -> sender;
{ auto(get_completion_scheduler<set_value_t>(
get_env(schedule(std::forward<Sch>(sch))))) }
-> same_as<remove_cvref_t<Sch>>;
} &&
same_as<domain-of-t<Sch>, domain-of-t<env_of_t<decltype(schedule(declval<Sch>()))>>> &&
equality_comparable<remove_cvref_t<Sch>> &&
copyable<remove_cvref_t<Sch>>;
}