This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
on algorithmSection: 33.9.12.8 [exec.on] Status: New Submitter: Eric Niebler Opened: 2026-03-23 Last modified: 2026-03-24
Priority: Not Prioritized
View all issues with New status.
Discussion:
As currently specified, for the expression on(sch, sndr), the starting domain is the receiver's
domain, and the (set_value) completion domain is sndr's completion domain, given that it starts
on sch. Those are the two domains that will be used to find customizations of on, neither
of which is the domain of sch.
on, they would expect on(sch, sndr) to use the domain
of sch to find the customization. So there is a gap between what would be least surprising and
what is currently specified.
In P3927, we added a get_completion_domain<T> query where T could
be either a completion tag (set_value_t, et. al) or void (and defaults to void), where
get_completion_domain<void> defaults to get_completion_domain<set_value_t>.
get_completion_domain<void>(get_env(sndr), env) is the domain that gets used by
transform_sender to find a set_value sender transform. In other words,
transform_sender(sndr, env) will, among other things, apply the following transform:
auto sndr2 = get_completion_domain<>(get_env(sndr), env)
.transform_sender(set_value, forward<Sndr>(sndr), env);
We can use this to query to make transform_sender use the domain of sch to find a customization
of on(sch, sndr).
Proposed resolution:
This wording is relative to N5032.
Modify 33.9.12.8 [exec.on] as indicated:
-9- Let
out_sndrbe a subexpression denoting a sender returned fromon(sch, sndr)or one equal to such, and letOutSndrbe the typedecltype((out_sndr)). For a pack of subexpressionsenv,get_completion_domain<>(get_env(out_sndr), env...)is expression-equivalent toget_completion_domain<set_value_t>(sch, env...). Letout_rcvrbe a subexpression denoting a receiver that has an environment of typeEnvsuch thatsender_in<OutSndr, Env>istrue. Letopbe an lvalue referring to the operation state that results from connectingout_sndrwithout_rcvr. Callingstart(op)shall […]