命名空间
变体
操作

std::execution::just_stopped

来自 cppreference.cn
< cpp‎ | execution
 
 
 
定义于头文件 <execution>
inline constexpr just_stopped_t just_stopped{};
struct just_stopped_t { /*unspecified*/ };
(自 C++26 起)
(自定义点对象)
调用签名
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 的函数调用运算符不参与重载解析。

[编辑] 示例