Files
cppdraft_translate/cppdraft/exec/adapt/general.md
2025-10-25 03:02:53 +03:00

82 lines
2.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[exec.adapt.general]
# 33 Execution control library [[exec]](./#exec)
## 33.9 Senders [[exec.snd]](exec.snd#exec.adapt.general)
### 33.9.12 Sender adaptors [[exec.adapt]](exec.adapt#general)
#### 33.9.12.1 General [exec.adapt.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L3002)
Subclause [[exec.adapt]](exec.adapt "33.9.12Sender adaptors") specifies a set of sender adaptors[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L3005)
The bitwise inclusive or operator is overloaded
for the purpose of creating sender chains[.](#2.sentence-1)
The adaptors also support function call syntax with equivalent semantics[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L3010)
Unless otherwise specified:
- [(3.1)](#3.1)
A sender adaptor is prohibited from causing observable effects,
apart from moving and copying its arguments,
before the returned sender is connected with a receiver using connect,
and start is called on the resulting operation state[.](#3.1.sentence-1)
- [(3.2)](#3.2)
A parent sender ([[exec.async.ops]](exec.async.ops "33.3Asynchronous operations")) with a single child sender sndr has
an associated attribute object equal to*FWD-ENV*(get_env(sndr)) ([[exec.fwd.env]](exec.fwd.env "33.5.1forwarding_­query"))[.](#3.2.sentence-1)
- [(3.3)](#3.3)
A parent sender with more than one child sender has
an associated attributes object equal to env<>{}[.](#3.3.sentence-1)
- [(3.4)](#3.4)
When a parent sender is connected to a receiver rcvr,
any receiver used to connect a child sender has
an associated environment equal to *FWD-ENV*(get_env(rcvr))[.](#3.4.sentence-1)
- [(3.5)](#3.5)
An adaptor whose child senders are all non-dependent ([[exec.async.ops]](exec.async.ops "33.3Asynchronous operations"))
is itself non-dependent[.](#3.5.sentence-1)
- [(3.6)](#3.6)
These requirements apply to any function
that is selected by the implementation of the sender adaptor[.](#3.6.sentence-1)
- [(3.7)](#3.7)
*Recommended practice*: Implementations should use
the completion signatures of the adaptors
to communicate type errors to users and
to propagate any such type errors from child senders[.](#3.7.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L3043)
If a sender returned from a sender adaptor specified in [[exec.adapt]](exec.adapt "33.9.12Sender adaptors") is specified to include set_error_t(Err) among its set of completion signatures
where decay_t<Err> denotes the type exception_ptr,
but the implementation does not potentially evaluate
an error completion operation with an exception_ptr argument,
the implementation is allowed to omit
the exception_ptr error completion signature from the set[.](#4.sentence-1)