名稱空間
變體
操作

std::execution::just_stopped

來自 cppreference.com
< cpp‎ | execution
 
 
 
定義於標頭檔案 <execution>
inline constexpr just_stopped_t just_stopped{};
struct just_stopped_t { /*unspecified*/ };
(C++26 起)
(定製點物件)
呼叫簽名 (Call signature)
execution::sender auto just_stopped();
(C++26 起)

一個傳送者工廠,它返回一個透過呼叫接收者的 set_stopped() 立即完成的傳送者。

表示式 just_stopped() 表示式等價於 /*make-sender*/(just_stopped)

自定義點物件

名稱 execution::just_stopped 表示一個定製點物件,它是一個 const 函式物件,型別為 字面量 semiregular 類型別。其型別未經 cv 限定的版本是一個標籤型別,表示為 execution::just_stopped_t

execution::just_stopped_t 的所有例項均相等。在相同引數上呼叫不同 execution::just_stopped_t 型別例項的效果是等價的,無論表示該例項的表示式是左值還是右值,以及是否為 const 限定(但是,volatile 限定的例項不要求可呼叫)。因此,execution::just_stopped 可以自由複製,並且其副本可以互換使用。

給定一組型別 Args...,如果 std::declval<Args>()... 滿足上面 execution::just_stopped 的引數要求,則 execution::just_stopped_t 建模:

否則,execution::just_stopped_t 的函式呼叫運算子不參與過載決議。

[編輯] 示例