名稱空間
變體
操作

std::execution::stopped_as_error

來自 cppreference.com
< cpp‎ | execution
 
 
 
定義於標頭檔案 <execution>
template< std::move_constructible Error >
execution::sender auto stopped_as_error( execution::sender auto snd, Error err );
(C++26 起)

[edit] 引數

snd - 輸入傳送器,其停止通道被對映到 err
err - 停止通道對映到的錯誤

[edit] 返回值

返回一個傳送器,它將停止通道對映到 err 的錯誤。

[edit] 示例