From 43b3a99c6b37f615ca10aed474958168fcdae4eb 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 de7394a5f5..1084fd458e 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -4630,9 +4630,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 @@ -4645,12 +4651,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}