std::execution::stopped_as_optional
< cpp | experimental | execution
|
在标头
<experimental/execution> 定义 |
||
|
execution::sender auto stopped_as_optional(
single-sender auto snd |
(C++26 起) | |
参数
| snd | - | 输入发送器,其值通道和停止通道均被映射。 |
返回值
返回一个发送器,将值通道从 T 映射为 std::optional<std::decay_t<T>>,并将停止通道映射为 std::optional<std::decay_t<T>> 的空值。