From 33368c6ee18c5653a11838687401576101eb63c2 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 20:01:35 +0100 Subject: [PATCH] P3887R1 Make when_all a Ronseal Algorithm --- source/exec.tex | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 6e99784a93..153268074e 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -4612,9 +4612,15 @@ \item Otherwise, evaluates: \begin{codeblock} -@\exposid{on_stop}@.reset(); -set_stopped(std::move(rcvr)); +if constexpr (@\placeholder{sends-stopped}@) { + @\exposid{on_stop}@.reset(); + set_stopped(std::move(rcvr)); +} \end{codeblock} +where \tcode{\placeholder{sends-stopped}} equals \tcode{true} +if and only if there exists an element \tcode{S} of \tcode{Sndrs} such that +\tcode{completion_signatures_of_t>} +contains \tcode{set_stopped_t()}. \end{itemize} \pnum @@ -4627,12 +4633,7 @@ state.@\exposid{on_stop}@.emplace( get_stop_token(get_env(rcvr)), @\exposid{on-stop-request}@{state.@\exposid{stop_src}@}); - if (state.@\exposid{stop_src}@.stop_requested()) { - state.@\exposid{on_stop.}@reset(); - set_stopped(std::move(rcvr)); - } else { - (start(ops), ...); - } + (start(ops), ...); } \end{codeblock}