-
Notifications
You must be signed in to change notification settings - Fork 815
LWG Motion 37: P4159R0 Make sender_in and receiver_of exposition-only
#8958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -510,7 +510,7 @@ | |||||
| concept @\libconcept{receiver}@ = @\seebelow@; | ||||||
|
|
||||||
| template<class Rcvr, class Completions> | ||||||
| concept @\libconcept{receiver_of}@ = @\seebelow@; | ||||||
| concept @\exposconceptnc{receiver-of}@ = @\seebelownc@; // \expos | ||||||
|
|
||||||
| template<class Rcvr, class ChildOp> | ||||||
| concept @\libconcept{inlinable_receiver}@ = @\seebelow@; | ||||||
|
|
@@ -548,7 +548,7 @@ | |||||
| concept @\libconcept{dependent_sender}@ = @\seebelow@; | ||||||
|
|
||||||
| template<class Sndr, class Rcvr> | ||||||
| concept @\libconcept{sender_to}@ = @\seebelow@; | ||||||
| concept @\exposconceptnc{sender-to}@ = @\seebelownc@; // \expos | ||||||
|
|
||||||
| template<class... Ts> | ||||||
| struct @\exposidnc{type-list}@; // \expos | ||||||
|
|
@@ -578,7 +578,7 @@ | |||||
| using @\exposidnc{single-sender-value-type}@ = @\seebelownc@; // \expos | ||||||
|
|
||||||
| template<class Sndr, class... Env> | ||||||
| concept @\exposconcept{single-sender}@ = @\seebelow@; // \expos | ||||||
| concept @\exposconceptnc{single-sender}@ = @\seebelownc@; // \expos | ||||||
|
|
||||||
| template<@\libconcept{sender}@ Sndr> | ||||||
| using tag_of_t = @\seebelow@; | ||||||
|
|
@@ -1012,7 +1012,7 @@ | |||||
|
|
||||||
| \pnum | ||||||
| Given subexpressions \tcode{sndr} and \tcode{rcvr} | ||||||
| such that \tcode{sender_to<decltype((sndr)), decltype((rcvr))>} is \tcode{true} | ||||||
| such that \tcode{\exposid{sender-to}<decltype((sndr)), decltype((rcvr))>} is \tcode{true} | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| and the expression \tcode{get_start_scheduler(get_env(rcvr))} is well-formed, | ||||||
| an operation state that is the result of calling \tcode{connect(sndr, rcvr)} | ||||||
| shall, if it is started, be started on an execution agent | ||||||
|
|
@@ -1357,7 +1357,7 @@ | |||||
| A receiver represents the continuation of an asynchronous operation. | ||||||
| The \libconcept{receiver} concept defines | ||||||
| the requirements for a receiver type\iref{exec.async.ops}. | ||||||
| The \libconcept{receiver_of} concept defines | ||||||
| The exposition-only concept \exposconcept{receiver-of} defines | ||||||
| the requirements for a receiver type that is usable as | ||||||
| the first argument of a set of completion operations | ||||||
| corresponding to a set of completion signatures. | ||||||
|
|
@@ -1391,7 +1391,7 @@ | |||||
| }; | ||||||
|
|
||||||
| template<class Rcvr, class Completions> | ||||||
| concept @\deflibconcept{receiver_of}@ = | ||||||
| concept @\defexposconcept{receiver-of}@ = | ||||||
| @\libconcept{receiver}@<Rcvr> && @\exposconcept{has-completions}@<Rcvr, Completions>; | ||||||
| } | ||||||
| \end{codeblock} | ||||||
|
|
@@ -1619,7 +1619,7 @@ | |||||
| let \tcode{Sndr} be \tcode{decltype((sndr))}. | ||||||
| Let \tcode{rcvr} be a receiver of type \tcode{Rcvr} | ||||||
| with associated environment \tcode{env} of type \tcode{Env} | ||||||
| such that \tcode{\libconcept{sender_to}<Sndr, Rcvr>} is \tcode{true}. | ||||||
| such that \tcode{\exposconcept{sender-to}<Sndr, Rcvr>} is \tcode{true}. | ||||||
| For the default implementation of the algorithm that produced \tcode{sndr}, | ||||||
| connecting \tcode{sndr} to \tcode{rcvr} and | ||||||
| starting the resulting operation state\iref{exec.async.ops} | ||||||
|
|
@@ -2477,7 +2477,7 @@ | |||||
| The \libconcept{sender_in} concept defines | ||||||
| the requirements for a sender type | ||||||
| that can create asynchronous operations given an associated environment type. | ||||||
| The \libconcept{sender_to} concept defines | ||||||
| The exposition-only concept \exposconcept{sender-to} defines | ||||||
| the requirements for a sender type | ||||||
| that can connect with a specific receiver type. | ||||||
| The \tcode{get_env} customization point object is used to access | ||||||
|
|
@@ -2532,9 +2532,9 @@ | |||||
| @\libconcept{sender}@<Sndr> && bool_constant<@\exposid{is-dependent-sender-helper}@<Sndr>()>::value; | ||||||
|
|
||||||
| template<class Sndr, class Rcvr> | ||||||
| concept @\deflibconcept{sender_to}@ = | ||||||
| concept @\defexposconcept{sender-to}@ = | ||||||
| @\libconcept{sender_in}@<Sndr, env_of_t<Rcvr>> && | ||||||
| @\libconcept{receiver_of}@<Rcvr, completion_signatures_of_t<Sndr, env_of_t<Rcvr>>> && | ||||||
| @\exposconcept{receiver-of}@<Rcvr, completion_signatures_of_t<Sndr, env_of_t<Rcvr>>> && | ||||||
| requires (Sndr&& sndr, Rcvr&& rcvr) { | ||||||
| connect(std::forward<Sndr>(sndr), std::forward<Rcvr>(rcvr)); | ||||||
| }; | ||||||
|
|
@@ -3199,7 +3199,7 @@ | |||||
| return awaiter{fn}; | ||||||
| } | ||||||
|
|
||||||
| @\exposid{operation-state-task}@ @\exposid{connect-awaitable}@(DS sndr, DR rcvr) requires @\libconcept{receiver_of}@<DR, Sigs> { | ||||||
| @\exposid{operation-state-task}@ @\exposid{connect-awaitable}@(DS sndr, DR rcvr) requires @\exposconcept{receiver-of}@<DR, Sigs> { | ||||||
| exception_ptr ep; | ||||||
| try { | ||||||
| if constexpr (@\libconcept{same_as}@<V, void>) { | ||||||
|
|
@@ -3251,7 +3251,7 @@ | |||||
| \item | ||||||
| \tcode{\libconcept{sender_in}<Sndr, env_of_t<Rcvr>>} | ||||||
| \item | ||||||
| \tcode{\libconcept{receiver_of}<Rcvr, completion_signatures_of_t<Sndr, env_of_t<Rcvr>>>} | ||||||
| \tcode{\exposconcept{receiver-of}<Rcvr, completion_signatures_of_t<Sndr, env_of_t<Rcvr>>>} | ||||||
| \end{itemize} | ||||||
|
|
||||||
| \rSec2[exec.factories]{Sender factories} | ||||||
|
|
@@ -6153,7 +6153,7 @@ | |||||
|
|
||||||
| \pnum | ||||||
| For a subexpression \tcode{sndr}, let \tcode{Sndr} be \tcode{decltype((sndr))}. | ||||||
| If \tcode{\libconcept{sender_to}<Sndr, \exposid{sync-wait-receiver}<\linebreak Sndr>>} | ||||||
| If \tcode{\exposconcept{sender-to}<Sndr, \exposid{sync-wait-receiver}<\linebreak Sndr>>} | ||||||
| is \tcode{false}, | ||||||
| the expression \tcode{sync_wait.apply_sender(sndr)} is ill-formed; | ||||||
| otherwise, it is equivalent to: | ||||||
|
|
@@ -6831,7 +6831,7 @@ | |||||
| \pnum | ||||||
| Let \exposid{sndr} be an expression of type \exposid{run-loop-sender}, | ||||||
| let \exposid{rcvr} be an expression | ||||||
| such that \tcode{\libconcept{receiver_of}<decltype((\exposid{rcvr})), CS>} is \tcode{true} | ||||||
| such that \tcode{\exposconcept{receiver-of}<decl\-type((\exposid{rcvr})), CS>} is \tcode{true} | ||||||
| where \tcode{CS} is the \tcode{completion_signatures} specialization above. | ||||||
| Let \tcode{C} be either \tcode{set_value_t} or \tcode{set_stopped_t}. | ||||||
| Then: | ||||||
|
|
@@ -7027,7 +7027,7 @@ | |||||
| template<class Sndr, class Promise> | ||||||
| concept @\defexposconcept{awaitable-sender}@ = | ||||||
| @\exposconcept{single-sender}@<Sndr, env_of_t<Promise>> && | ||||||
| @\libconcept{sender_to}@<Sndr, | ||||||
| @\exposconcept{sender-to}@<Sndr, | ||||||
| typename @\exposid{sender-awaitable}@<Sndr, Promise>::@\exposid{awaitable-receiver}@> && // \seebelow | ||||||
| requires (Promise& p) { | ||||||
| { p.unhandled_stopped() } -> @\libconcept{convertible_to}@<coroutine_handle<>>; | ||||||
|
|
@@ -7422,7 +7422,7 @@ | |||||
| \pnum | ||||||
| Let \tcode{sndr} be an expression of type \exposid{inline-sender}, | ||||||
| let \tcode{rcvr} be an expression such that | ||||||
| \tcode{\libconcept{receiver_of}<decltype((rcvr)), CS>} is \tcode{true} | ||||||
| \tcode{\exposconcept{receiver-of}<decl\-type((rcvr)), CS>} is \tcode{true} | ||||||
| where \tcode{CS} is \tcode{completion_signatures<set_value_t()>}, | ||||||
| then the expression \tcode{connect(sndr, rcvr)} has | ||||||
| type \tcode{\exposid{inline-state}<remove_cvref_t<decltype((rcvr))>>} | ||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a drive by?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just whitespace, yes. The comment wasn't aligned properly.