Namespaces
Variants

std::execution:: stopped_as_error

From cppreference.net
定义于头文件 <execution>
template < std:: move_constructible Error >
execution :: sender auto stopped_as_error ( execution :: sender auto snd, Error err ) ;
(C++26 起)

参数

snd - 输入发送方,其停止通道被映射到 err
err - 停止通道被映射到的错误对象

返回值

返回一个发送器,将已停止的通道映射到 err 错误。

示例