std::execution::just_error
来自cppreference.com
< cpp | experimental | execution
在标头 <experimental/execution> 定义
|
||
execution::sender auto just_error( auto && error ); |
(C++26 起) | |
参数
error | - | 输入错误,将被注入并由发送器返回。 |
返回值
返回一个没有完成调度器的发送器,它发送所提供的值。
注解
如果所提供的错误是左值引用,则在所返回的发送器中做出一个副本,并向接收器的 set_error 发送到该副本的非 const 左值引用。如果所提供的值是右值引用,则将它移动到所返回的发送器中,并向接收器的 set_error 发送到它的右值引用。