diff --git a/execution.html b/execution.html index 97c8ad2..880aa51 100644 --- a/execution.html +++ b/execution.html @@ -2246,7 +2246,7 @@
std :: execution
Add a requirement on queryable objects that if
is well-formed, then
is
expression-equivalent to it. This is necessary to properly specify how to
join two environments in the presence of queries that have defaults.
The
concept requires that
satisfies
.
The exposition-only class template
is greatly
+enhanced, and the sender algorithms are respecified in term of it.
The changes since R6 are as follows:
@@ -6119,20 +6124,16 @@A completion operation has an associated completion signature. A completion signature is a function type that describes a
-completion operation. An asychronous operation has a finite set of possible
-completion signatures corresponding to the completion operations that the
-asynchronous operation potentially evaluates ([basic.def.odr]). The
-completion signature’s return type is the completion tag associated with the
-completion function that executes the completion operation. The completion
-signature’s parameter types are the (possibly
- and reference-qualified)
-types of the asynchronous operation’s result datums, modulo rvalue reference
-qualification (see
in [exec.general]).
-[Example: For subexpressions
and
, the completion signature
-corresponding to the completion operation
is
. -- end example] Together,
+
A completion signature is a function type that
+describes a completion operation. An asychronous operation has a finite set
+of possible completion signatures corresponding to the completion operations
+that the asynchronous operation potentially evaluates ([basic.def.odr]). For
+a completion function
, receiver
, and pack of arguments
,
+let
be the completion operation
, and let
be the function type
.
+A completion signature
is associated with
if and only if
is true
([exec.general]). Together,
a sender type and an environment type
determine the set of completion
signatures of an asynchronous operation that results from connecting the
-sender with a receiver whose environment has type
. The type of the receiver does not affect an asychronous
+sender with a receiver that has an environment of type
. The type of the receiver does not affect an asychronous
operation’s completion signatures, only the type of the receiver’s
environment.
Subclauses [exec.factories] and [exec.adapt] define customizable algorithms
-that return senders. Each algorithm has a default implementation specified
-herein. Let
be the result of an invocation of such an algorithm or an
-object equal to such ([concepts.equality]), and let
be
. Let
be the type of an environment
such that
is true
, and let
be a receiver whose
-associated environment is
. For the default implementation of the
+that return senders. Each algorithm has a default implementation. Let
be the result of an invocation of such an algorithm or an object equal to
+such ([concepts.equality]), and let
be
. Let
be a receiver with associated environment
of type
such that
is true
. For the default implementation of the
algorithm that produced
, connecting
to
and starting the
resulting operation state ([async.ops]) necessarily results in the potential
-evaluation ([intro.execution]) of a set of completion operations whose first
+evaluation ([basic.def.odr]) of a set of completion operations whose first
argument is a subexpression equal to
. Let
be a pack of
completion signatures corresponding to this set of completion operations.
Then the type of the expression
is a
specialization of the class template
,
([exec.utils.cmplsigs]) the set of whose template arguments is
. If a
user-provided implementation of the algorithm that produced
is
-selected instead of the default, the set of completion signatures denoted by
-the return type of
shall be a
-superset of
, with any additional completion signatures corresponding
-to error or stopped completion operations.
completion_signatures_of_t < Sndr , Env >
and that is not
+part of Sigs
shall correspond to error or stopped completion operations,
+unless otherwise specified.
This subclause makes use of the following exposition-only entities.
tuple - like
is usable as the initializer
+ An expression of type
is usable as the initializer
of a structured binding declaration [dcl.struct.bind].
[]( auto & state , auto & rcvr , auto & ... ops ) noexcept -> completion_signatures <> { +[]( auto & state , auto & rcvr , auto & ... ops ) noexcept -> void { ( execution :: start ( ops ), ...); -return {}; }
The return type of
’s customization of
is computed as follows.
Let
be the type of an environment, let the type
be
- the (possibly cv- and ref-qualified) type of a specialization
- of
, and let
be the type of the
-th child sender of
, with the same
- cv- and ref-qualifications as
.
Let
be the type
For a subexpression
let
be
. Let
be a receiver that has an associated environment of type
such that
is true
.
denotes
+a specialization of
, the set of whose
+template arguments correspond to the set of completion operations
+that are potentially evaluated as a result of calling
on the
+operation state that results from connecting
and
. When
is false
, the type denoted by
, if any,
+is not a specialization of
. When
is false
,
+implementations are encouraged to use the type denoted by
to
+communicate to users why.
Given a subexpression
, let
be
, let
be
-the type of an environment, and let
be a receiver whose associated
-environment is
. A completion operation is a permissible completion for
and
if its
-completion signature appears in the argument list of the specialization of
denoted by
.
and
model
if connecting
to
and starting the resulting operation state does not cause the potential
-evaluation of any completion operation on
that is not a permissible
-completion for
and
.
rcvr
be a receiver with an associated
+environment Env
. A completion operation is a permissible completion for Sndr
and Env
if its
+completion signature appears in the argument list of the specialization of completion_signatures
denoted by completion_signatures_of_t < Sndr , Env >
. Sndr
and Env
model sender_in < Sndr , Env >
if all the completion
+operations that are potentially evaluated by connecting sndr
to rcvr
and
+starting the resulting operation state are permissible completions for Sndr
and Env
.
A type
satisfies and models the exposition-only concept
if it names a specialization
of the
class template.
execution :: default_domain
[exec.domain.default]+struct default_domain { -template < sender Sender , class ... Env > -requires ( sizeof ...( Env ) <= 1 ) -static constexpr sender decltype ( auto ) transform_sender ( Sender && sndr , const Env & ... env ) noexcept ( see below ); +template < sender Sender > +static constexpr sender decltype ( auto ) transform_sender ( Sender && sndr ) noexcept ( see below ); + +template < sender Sender , queryable Env > +static constexpr sender decltype ( auto ) transform_sender ( Sender && sndr , const Env & env ) noexcept ( see below ); -template < sender Sender , class Env > +template < sender Sender , queryable Env > static constexpr decltype ( auto ) transform_env ( Sender && sndr , Env && env ) noexcept ; template < class Tag , sender Sender , class ... Args > @@ -7455,20 +7456,31 @@11.9.4.1. Static members [exec.domain.default.statics] -
-template < sender Sender , class ... Env > -requires ( sizeof ...( Env ) <= 1 ) -constexpr sender decltype ( auto ) default_domain :: transform_sender ( Sender && sndr , const Env & ... env ) noexcept ( see below ); +template < sender Sender > +constexpr sender decltype ( auto ) default_domain :: transform_sender ( Sender && sndr ) noexcept ( see below ); -
- -
Returns:
+if that expression is well-formed; otherwise,
tag_of_t < Sender > (). transform_sender ( std :: forward < Sender > ( sndr ), env ...) .
std :: forward < Sender > ( sndr ) Returns:
if that expression is well-formed; otherwise,
tag_of_t < Sender > (). transform_sender ( std :: forward < Sender > ( sndr )) .
std :: forward < Sender > ( sndr ) Remarks: The exception specification is equivalent to:
-noexcept ( tag_of_t < Sender > (). transform_sender ( std :: forward < Sender > ( sndr ), env ...)) +noexcept ( tag_of_t < Sender > (). transform_sender ( std :: forward < Sender > ( sndr ))) if that expression is well-formed; otherwise,
true
;template < sender Sender , class Env > ++template < sender Sender , queryable Env > +constexpr sender decltype ( auto ) default_domain :: transform_sender ( Sender && sndr , const Env & env ) noexcept ( see below ); ++
+- +
Returns:
+if that expression is well-formed; otherwise,
tag_of_t < Sender > (). transform_sender ( std :: forward < Sender > ( sndr ), env ) .
std :: forward < Sender > ( sndr ) - +
Remarks: The exception specification is equivalent to:
++noexcept ( tag_of_t < Sender > (). transform_sender ( std :: forward < Sender > ( sndr ), env )) +if that expression is well-formed; otherwise,
+true
;template < sender Sender , queryable Env > constexpr decltype ( auto ) default_domain :: transform_env ( Sender && sndr , Env && env ) noexcept ; template < class Domain , sender Sender , class ... Env > -requires ( sizeof ...( Env ) <= 1 ) -constexpr sender decltype ( auto ) transform_sender ( Domain dom , Sender && sndr , const Env & ... env ); +template < class Domain , sender Sender > +constexpr sender decltype ( auto ) transform_sender ( Domain dom , Sender && sndr ); + +template < class Domain , sender Sender , queryable Env > +constexpr sender decltype ( auto ) transform_sender ( Domain dom , Sender && sndr , const Env & env );
- -
Returns: Let
+be the expression
s2 if that - expression is well-formed; otherwise,
dom . transform_sender ( std :: forward < Sender > ( sndr ), env ...) . - If
default_domain (). transform_sender ( std :: forward < Sender > ( sndr ), env ...) and
s2 have the same type ignoring _cv_ qualifiers, - returns
sndr ; otherwise,
s2 .
transform_sender ( dom , s2 , env ...) Returns: Let
be a parameter pack consisting of + the single expression
ENV for the second overload and an empty pack for + the first. Let
env be the expression
s2 if that expression is well-formed; otherwise,
dom . transform_sender ( std :: forward < Sender > ( sndr ), ENV ...) . If
default_domain (). transform_sender ( std :: forward < Sender > ( sndr ), ENV ...) and
s2 have the same type ignoring cv qualifiers, returns
sndr ; otherwise,
s2 .
transform_sender ( dom , s2 , ENV ...) template < class Domain , sender Sender , class Env > constexpr decltype ( auto ) transform_env ( Domain dom , Sender && sndr , Env && env ) noexcept ; @@ -7746,7 +7759,7 @@
just - sender < Tag , Ts ... > behave as do -expressions of type. +expressions of type
basic - sender < Tag , tuple - like < Ts ... >> .
basic - sender < Tag , product - type < Ts ... >> 11.9.9.3.
[exec.read]
execution :: read @@ -7988,8 +8001,8 @@
This causes the
sender to become
transfer ( s , sch ) when it is connected with a receiver whose -execution domain does not customize
schedule_from ( sch , s ) .
transfer
This causes the
sender to become
when it is connected with a receiver with an
+execution domain that does not customize
.
execution :: schedule_from
[exec.schedule.from]then_t
, upon_error_t
,
and upon_stopped_t
as follows:
template <> -struct impls - for < then - cpo > : default - impls { +struct impls - for < decltype ( auto ( then - cpo )) > : default - impls { static constexpr auto complete = [] < class Tag , class ... Args > ( auto , auto & fn , auto & rcvr , Tag , Args && ... args ) noexcept -> void { if constexpr ( same_as < Tag , set - cpo > ) { @@ -8084,7 +8097,7 @@
s ,, and
shape , let
f be
S ,
decltype (( s )) be
Shape , and
decltype (( shape )) be
F . If
decltype (( f )) does not satisfy
S or
sender does not satisfy
Shape ,
integral is ill-formed. Otherwise, the expression
bulk is expression-equivalent to:
bulk ( s , shape , f ) transform_sender ( get - domain - early ( s ), -make - bulk - sender ( tuple - like { shape , f }, s )); +make - bulk - sender ( product - type { shape , f }, s )); where
@@ -8478,7 +8491,7 @@is expression-equivalent to
make - bulk - sender ( t , s ) for a subexpression
make - sender ( bulk , t , s ) and returns a sender object
t that behaves as follows:
s2 This causes the
sender to become
when_all_with_variant ( s ...) when it is connected with a -receiver whose execution domain does not customize
when_all ( into_variant ( s )...) .
when_all_with_variant
when_all_with_variant
.Given a pack of subexpressions
, let
be an object returned from
or
or a copy of such, and let
be the environment object returned from
. Given a query
object
,
is expression-equivalent to
when
is
; otherwise, it is ill-formed.