33 Execution control library [exec]

33.5 Queries [exec.queries]

33.5.9 execution​::​get_completion_scheduler [exec.get.compl.sched]

The name get_completion_scheduler denotes a query object template.
Let completion-fn be a completion function ([exec.async.ops]); let completion-fn-tag be the associated completion tag of completion-fn; let args be a pack of subexpressions; and let sndr be a subexpression such that sender<decltype((sndr))> is true and get_completion_scheduler<completion-fn-tag>(get_env(sndr)) is well-formed and denotes a scheduler sch.
get_completion_scheduler<completion-fn-tag> obtains the completion scheduler associated with a completion tag from a sender's attributes.
For a subexpression q, the expression get_completion_scheduler<completion-fn-tag>(q) is ill-formed if completion-fn-tag is not one of set_value_t, set_error_t, or set_stopped_t.
Otherwise, get_completion_scheduler<completion-fn-tag>(q) is expression-equivalent to MANDATE-NOTHROW(AS-CONST(q).query(get_completion_scheduler<completion-fn-tag>)) Mandates: If the expression above is well-formed, its type satisfies scheduler.
If an asynchronous operation created by connecting sndr with a receiver rcvr causes the evaluation of completion-fn(rcvr, args...), the behavior is undefined unless the evaluation happens on an execution agent that belongs to sch's associated execution resource.
The expression forwarding_query(get_completion_scheduler<completion-fn-tag>) is a core constant expression and has value true.