2.7 KiB
[exec.scope.concepts]
33 Execution control library [exec]
33.14 Execution scope utilities [exec.scope]
33.14.1 Execution scope concepts [exec.scope.concepts]
The scope_token concept defines the requirements on a type Token that can be used to create associations between senders and an async scope.
Let test-sender and test-env be unspecified types such thatsender_in<test-sender, test-env> is modeled.
namespace std::execution {templateconcept scope_token =copyable &&requires(const Token token) {{ token.try_associate() } -> same_as; { token.disassociate() } noexcept -> same_as; { token.wrap(declval<test-sender>()) } -> sender_in<test-env>; };}
A type Token models scope_token only if:
no exceptions are thrown from copy construction, move construction, copy assignment, or move assignment of objects of type Token; and
given an lvalue token of type (possibly const) Token,
for all expressions sndr such thatdecltype((
sndr)) models sender:
token.wrap(sndr) is a valid expression,
decltype(token.wrap(sndr)) models sender, and
completion_signatures_of_t<decltype(token.wrap(sndr)), E> contains the same completion signatures as completion_signatures_of_t<decltype((sndr)), E> for all types E such that sender_in<decltype((sndr)), E> is modeled.