Date: Sun, 10 May 2026 09:59:02 -0700
Follow-up: I checked NVIDIA/stdexec, and its when_all state construction
uses the connected receiver's environment for the sends-stopped test:
(sends_stopped<_Child, env_of_t<_Receiver>> || ...)
(
https://github.com/NVIDIA/stdexec/blob/da7640aa1002cfcd665254f03434d3c949844361/include/stdexec/__detail/__when_all.hpp#L415
)
On Mon, Apr 27, 2026 at 7:52 AM Abhinav Agarwal <
abhinavagarwal1996_at_[hidden]> wrote:
>
> While reading N5032 [exec.when.all], I noticed what looks like a wording
> defect introduced by P3887R1 ("Make when_all a Ronseal Algorithm"). In
> state-type::complete, the stopped-disposition branch says, in effect:
>
> if constexpr (sends-stopped) {
> on_stop.reset();
> set_stopped(std::move(rcvr));
> }
>
> where sends-stopped is true iff there exists an element S of Sndrs such
> that
>
> completion_signatures_of_t<S, when-all-env<Env>>
>
> contains set_stopped_t().
>
> I do not think Env is in scope here. state-type::complete is specified in
> the context of make-state<Rcvr>::operator()<Sndrs...>, so the available
> template parameters are Rcvr and Sndrs.... Env is a template parameter of
> check-types<Sndr, Env...>, where the related when-all-env<Env> idiom is
> used, but that scope is not active inside complete.
>
> The natural fix seems to be:
>
> completion_signatures_of_t<S, when-all-env<env_of_t<Rcvr>>>
>
> which is consistent with the same make-state wording's reliance on
> env_of_t<Rcvr>. The same wording appears in P3887R1, so the issue appears
> to originate in the adopted paper wording.
>
> There is a closely analogous precedent in the same section: LWG 4438
> ("Bad expression in [exec.when.all]") handled similar
> dangling/undefined-name wording in make-when-all-env.
>
> Am I reading this correctly, and is this already tracked? I did not find
> a matching open issue. If it is not already tracked, I would be happy to
> send a formal LWG.
>
> -- Abhinav Agarwal
uses the connected receiver's environment for the sends-stopped test:
(sends_stopped<_Child, env_of_t<_Receiver>> || ...)
(
https://github.com/NVIDIA/stdexec/blob/da7640aa1002cfcd665254f03434d3c949844361/include/stdexec/__detail/__when_all.hpp#L415
)
On Mon, Apr 27, 2026 at 7:52 AM Abhinav Agarwal <
abhinavagarwal1996_at_[hidden]> wrote:
>
> While reading N5032 [exec.when.all], I noticed what looks like a wording
> defect introduced by P3887R1 ("Make when_all a Ronseal Algorithm"). In
> state-type::complete, the stopped-disposition branch says, in effect:
>
> if constexpr (sends-stopped) {
> on_stop.reset();
> set_stopped(std::move(rcvr));
> }
>
> where sends-stopped is true iff there exists an element S of Sndrs such
> that
>
> completion_signatures_of_t<S, when-all-env<Env>>
>
> contains set_stopped_t().
>
> I do not think Env is in scope here. state-type::complete is specified in
> the context of make-state<Rcvr>::operator()<Sndrs...>, so the available
> template parameters are Rcvr and Sndrs.... Env is a template parameter of
> check-types<Sndr, Env...>, where the related when-all-env<Env> idiom is
> used, but that scope is not active inside complete.
>
> The natural fix seems to be:
>
> completion_signatures_of_t<S, when-all-env<env_of_t<Rcvr>>>
>
> which is consistent with the same make-state wording's reliance on
> env_of_t<Rcvr>. The same wording appears in P3887R1, so the issue appears
> to originate in the adopted paper wording.
>
> There is a closely analogous precedent in the same section: LWG 4438
> ("Bad expression in [exec.when.all]") handled similar
> dangling/undefined-name wording in make-when-all-env.
>
> Am I reading this correctly, and is this already tracked? I did not find
> a matching open issue. If it is not already tracked, I would be happy to
> send a formal LWG.
>
> -- Abhinav Agarwal
Received on 2026-05-10 16:59:31
