tmp/tmpa5p68_b4/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Execution scope concepts <a id="exec.scope.concepts">[[exec.scope.concepts]]</a>
|
| 2 |
+
|
| 3 |
+
The `scope_token` concept defines the requirements on a type `Token`
|
| 4 |
+
that can be used to create associations between senders and an async
|
| 5 |
+
scope.
|
| 6 |
+
|
| 7 |
+
Let *test-sender* and *test-env* be unspecified types such that
|
| 8 |
+
`sender_in<test-sender, test-env>` is modeled.
|
| 9 |
+
|
| 10 |
+
``` cpp
|
| 11 |
+
namespace std::execution {
|
| 12 |
+
template<class Token>
|
| 13 |
+
concept scope_token =
|
| 14 |
+
copyable<Token> &&
|
| 15 |
+
requires(const Token token) {
|
| 16 |
+
{ token.try_associate() } -> same_as<bool>;
|
| 17 |
+
{ token.disassociate() } noexcept -> same_as<void>;
|
| 18 |
+
{ token.wrap(declval<test-sender>()) } -> sender_in<test-env>;
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
A type `Token` models `scope_token` only if:
|
| 24 |
+
|
| 25 |
+
- no exceptions are thrown from copy construction, move construction,
|
| 26 |
+
copy assignment, or move assignment of objects of type `Token`; and
|
| 27 |
+
- given an lvalue `token` of type (possibly const) `Token`, for all
|
| 28 |
+
expressions `sndr` such that `decltype(({}sndr))` models `sender`:
|
| 29 |
+
- `token.wrap(sndr)` is a valid expression,
|
| 30 |
+
- `decltype(token.wrap(sndr))` models `sender`, and
|
| 31 |
+
- `completion_signatures_of_t<decltype(token.wrap(sndr)), E>` contains
|
| 32 |
+
the same completion signatures as
|
| 33 |
+
`completion_signatures_of_t<decltype((sndr)), E>` for all types `E`
|
| 34 |
+
such that `sender_in<decltype((sndr)), E>` is modeled.
|
| 35 |
+
|