Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/execution/just error"

From cppreference.com
< cpp‎ | execution
m (fmt.)
(move to cpp/experimental)
Line 1: Line 1:
{{cpp/execution/title|just_error}}
 
{{cpp/experimental/execution/navbar}}
 
{{ddcl|since=c++26|header=execution|
 
execution::sender auto just_error( auto && error );
 
}}
 
  
===Parameters===
 
{{par begin}}
 
{{par|error|input error which will be injected and returned by the receiver.}}
 
{{par end}}
 
 
===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 {{lc|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 {{tt|set_error}}.
 

Revision as of 23:12, 1 July 2024