Template Struct as_sender¶
Defined in File as_sender.hpp
Struct Documentation¶
-
template<typename
E>
structconcore::v1::as_sender¶ Wrapper that transforms a receiver into a functor.
The receiver should model
receiver_of<>.- Template Parameters
R: The type of the receiver
This will store a reference to the receiver; the receiver must not get out of scope.
When this functor is called set_value() will be called on the receiver. If an exception is thrown, the set_error() function is called.
If the functor is never called, the destructor of this object will call set_done().
This types models the sender concept.
Public Types
-
using
value_types= Variant<Tuple<>>¶ The value types that defines the values that this sender sends to receivers.
-
using
error_types= Variant<std::exception_ptr>¶ The type of error that this sender sends to receiver.
Public Functions
-
template<typename
R>
as_operation<E, R>connect(R &&r) &&¶ The connect CPO that returns an operation state object.
-
template<typename
R>
as_operation<E, R>connect(R &&r) const &¶ This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Public Static Attributes
-
constexpr bool
sends_done= false¶ Indicates that this sender never sends a done signal.