Skip to content
Open
Changes from 1 commit
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
18 changes: 17 additions & 1 deletion source/exec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,8 @@
{ 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{constructible_from}@<remove_cvref_t<Rcvr>, Rcvr> && // lvalues are copyable
is_nothrow_move_constructible_v<remove_cvref_t<Rcvr>>;

template<class Signature, class Rcvr>
concept @\defexposconcept{valid-completion-for}@ = // \expos
Expand Down Expand Up @@ -2856,6 +2857,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