Commit 364da35
committed
let_value, let_error, & let_stopped: Dependent set_error_t(std::exception_ptr)
let_value, let_error, and let_stopped have three different kinds of
completion signatures:
- Those obtained from the sender type returned by the invocable,
- Those passed through from the child sender, and
- Possibly set_error_t(std::exception_ptr)
The latter must be added when:
- Decay-copying the apropos result datums of the child sender can throw,
- Invoking the invocable with any set of decay-copied result datums can
throw, or
- Connecting any of the sender types which can be returned by the
invocable can throw
Note that if the child of let_value, let_error, or let_stopped is not
dependent the apropos result datums can be determined without the
context of an environment. This means, in turn, that in such a situation
it can be determined, without the context of an environment, whether
invocation of the invocable can throw (since the type of the decay-
copied result datums with which it will be invoked can be known).
The last of the bullets above, however, presents a problem in an
environment-free context. Computing whether or not a sender can be
connected without throwing requires the context of an environment (see
P3388).
Previously let_value, let_error, and let_stopped unconditionally added
set_error_t(std::exception_ptr) in the case where no environment was
provided. This created the illusion that the sender was not dependent,
and led to compilation failures in situations such as the test added by
this commit.
The above might seem to imply that let_value, let_error, and let_stopped
are always dependent, but this isn't true. In the case where
set_error_t(std::exception_ptr) is already a possible completion
signature it doesn't matter whether or not connecting the sender
returned by the invocable can throw.
Reified the above: let_value, let_error, and let_stopped indicate they
are dependent when the question of whether or not connecting the sender
returned by the invocable throws determines the presence of
set_error_t(std::exception_ptr), otherwise they can advertise non-
dependent completion signatures.1 parent e92245d commit 364da35
2 files changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
568 | 586 | | |
569 | 587 | | |
570 | 588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
103 | 113 | | |
104 | 114 | | |
105 | 115 | | |
| |||
0 commit comments