Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions source/exec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,9 @@
requires(const remove_cvref_t<Rcvr>& rcvr) {
{ get_env(rcvr) } -> @\exposconcept{queryable}@;
} &&
@\libconcept{move_constructible}@<remove_cvref_t<Rcvr>> && // rvalues are movable, and
@\libconcept{constructible_from}@<remove_cvref_t<Rcvr>, Rcvr>; // lvalues are copyable
@\libconcept{move_constructible}@<remove_cvref_t<Rcvr>> && // rvalues are movable, and
@\libconcept{constructible_from}@<remove_cvref_t<Rcvr>, Rcvr> && // lvalues are copyable, and
is_nothrow_move_constructible_v<remove_cvref_t<Rcvr>>; // no-throw-movable

template<class Signature, class Rcvr>
concept @\defexposconcept{valid-completion-for}@ = // \expos
Expand Down Expand Up @@ -2860,6 +2861,21 @@
Otherwise, \tcode{\exposid{connect-awaitable}(new_sndr, rcvr)}.
\end{itemize}
Except that \tcode{rcvr} is evaluated only once.
The program is ill-formed, no diagnostic required,
if there exists an rvalue expression \tcode{rcvr2} such that:
\begin{itemize}
\item \tcode{decltype(rcvr2)} models \libconcept{receiver},
\item \tcode{noexcept(rcvr2)} is \tcode{true},
\item \tcode{is_same_v<decltype(get_env(rcvr2)), decltype(get_env(rcvr))>} is \tcode{true},
\item \tcode{noexcept(execution::connect(sndr, rcvr))} is \tcode{true}, and
\item \tcode{noexcept(execution::connect(sndr, rcvr2))}
is well-formed and evaluates to \tcode{false}.
\end{itemize}
\begin{note}
This allows determination of whether \tcode{connect} throws
with only the context of the environment,
such as within \tcode{get_completion_signatures}.
\end{note}

\mandates
The following are \tcode{true}:
Expand Down