Skip to content

Commit

Permalink
Merge pull request #201 from cplusplus/fix-receiver-adaptor-get-env-e…
Browse files Browse the repository at this point in the history
…xception-spec

`receiver_adaptor`'s customization of `get_env` should be unconditionally `noexcept`
  • Loading branch information
ericniebler authored Feb 29, 2024
2 parents cb283cc + cc30524 commit b42ec3d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions execution.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7512,8 +7512,7 @@ template<class Domain, class Tag, sender Sndr, class... Args>

friend void tag_invoke(set_stopped_t, Derived&& self) noexcept;

friend decltype(auto) tag_invoke(get_env_t, const Derived& self)
noexcept(<i>see below</i>);
friend decltype(auto) tag_invoke(get_env_t, const Derived& self) noexcept;

[[no_unique_address]] Base base_; // present if and only if <i>HAS-BASE</i> is true
};
Expand Down Expand Up @@ -7593,24 +7592,19 @@ template&lt;class Domain, class Tag, sender Sndr, class... Args>
* Otherwise, <code>set_stopped(<i>GET-BASE</i>(std::move(self)))</code>.

<pre highlight="c++">
friend decltype(auto) tag_invoke(get_env_t, const Derived& self)
noexcept(<i>see below</i>);
friend decltype(auto) tag_invoke(get_env_t, const Derived& self) noexcept;
</pre>

1. <i>Constraints:</i> Either `self.get_env()` is a valid expression or `typename Derived::get_env` denotes a type and <code><i>callable</i>&lt;get_env_t, <i>BASE-TYPE</i>(const Derived&)></code> is `true`.

2. <i>Effects:</i> Equivalent to:
2. <i>Mandates:</i> `noexcept(self.get_env())` is `true` if it is a valid expression.

3. <i>Effects:</i> Equivalent to:

* If `self.get_env()` is a valid expression, `self.get_env()`;

* Otherwise, <code>get_env(<i>GET-BASE</i>(self))</code>.

3. <i>Remarks:</i> The expression in the `noexcept` clause is:

* If `self.get_env()` is a valid expression, `noexcept(self.get_env())`;

* Otherwise, <code>noexcept(get_env(<i>GET-BASE</i>(self)))</code>.

### `execution::completion_signatures` <b>[exec.utils.cmplsigs]</b> ### {#spec-execution.snd_rec_utils.completion_sigs}

1. `completion_signatures` is a type that encodes a set of completion signatures
Expand Down

0 comments on commit b42ec3d

Please sign in to comment.