Skip to content

Commit c996222

Browse files
authored
Merge 2025-11 LWG Motion 9
P3388R3 When Do You Know connect Doesn’t Throw?
2 parents 2ddd3ec + 67309a0 commit c996222

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

source/exec.tex

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,9 @@
11791179
requires(const remove_cvref_t<Rcvr>& rcvr) {
11801180
{ get_env(rcvr) } -> @\exposconcept{queryable}@;
11811181
} &&
1182-
@\libconcept{move_constructible}@<remove_cvref_t<Rcvr>> && // rvalues are movable, and
1183-
@\libconcept{constructible_from}@<remove_cvref_t<Rcvr>, Rcvr>; // lvalues are copyable
1182+
@\libconcept{move_constructible}@<remove_cvref_t<Rcvr>> && // rvalues are movable, and
1183+
@\libconcept{constructible_from}@<remove_cvref_t<Rcvr>, Rcvr> && // lvalues are copyable, and
1184+
is_nothrow_move_constructible_v<remove_cvref_t<Rcvr>>; // no-throw-movable
11841185

11851186
template<class Signature, class Rcvr>
11861187
concept @\defexposconcept{valid-completion-for}@ = // \expos
@@ -2860,6 +2861,21 @@
28602861
Otherwise, \tcode{\exposid{connect-awaitable}(new_sndr, rcvr)}.
28612862
\end{itemize}
28622863
Except that \tcode{rcvr} is evaluated only once.
2864+
The program is ill-formed, no diagnostic required,
2865+
if there exists an rvalue expression \tcode{rcvr2} such that:
2866+
\begin{itemize}
2867+
\item \tcode{decltype(rcvr2)} models \libconcept{receiver},
2868+
\item \tcode{noexcept(rcvr2)} is \tcode{true},
2869+
\item \tcode{is_same_v<decltype(get_env(rcvr2)), decltype(get_env(rcvr))>} is \tcode{true},
2870+
\item \tcode{noexcept(execution::connect(sndr, rcvr))} is \tcode{true}, and
2871+
\item \tcode{noexcept(execution::connect(sndr, rcvr2))}
2872+
is well-formed and evaluates to \tcode{false}.
2873+
\end{itemize}
2874+
\begin{note}
2875+
This allows determination of whether \tcode{connect} throws
2876+
with only the context of the environment,
2877+
such as within \tcode{get_completion_signatures}.
2878+
\end{note}
28632879

28642880
\mandates
28652881
The following are \tcode{true}:

0 commit comments

Comments
 (0)