Namespaces
Variants
Views
Actions

std::execution::just_error

From cppreference.com
< cpp‎ | execution
Revision as of 10:10, 4 October 2024 by Space Mission (Talk | contribs)

 
 
 
Defined in header <execution>
execution::sender auto just_error( auto && error );
(since C++26)

Parameters

error - input error which will be injected and returned by the receiver.

Return value

Returns a sender with no completion schedulers, which sends the provided values.

Notes

If the provided error is an lvalue reference, a copy is made inside the returned sender and a non-const lvalue reference to the copy is sent to the receiver’s set_error. If the provided value is an rvalue reference, it is moved into the returned sender and an rvalue reference to it is sent to the receiver’s set_error.