名稱空間
變體
操作

std::execution::stopped_as_optional

來自 cppreference.com
< 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] 示例