命名空间
变体
操作

std::execution::stopped_as_optional

来自 cppreference.cn
< cpp‎ | execution
 
 
 
定义于头文件 <execution>
execution::sender auto stopped_as_optional( /*single-sender*/ auto snd );
(C++26 起)

[edit] 参数

snd - 输入发送方,其值通道和停止通道被映射。

[edit] 返回值

返回一个发送方,它将值通道从 `T` 映射到 std::optional<std::decay_t<T>>,并将停止通道映射到一个空的 std::optional<std::decay_t<T>> 的值。

[edit] 示例