Template Struct as_invocable¶
Defined in File as_invocable.hpp
Struct Documentation¶
-
template<typename
R>
structconcore::v1::as_invocable¶ 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().
- See
Public Functions
-
as_invocable(as_invocable &&other) noexcept¶ Move constructor.
-
as_invocable &
operator=(as_invocable &&other) noexcept¶ Move assignment.
-
as_invocable(const as_invocable&) = delete¶ Copy constructor is DISABLED.
-
as_invocable &
operator=(const as_invocable&) = delete¶ Copy assignment is DISABLED.
-
~as_invocable()¶ Destructor.
-
void
operator()() noexcept¶ Call operator.
This forwards the call to the receiver by calling set_value(). If an exception is thrown during this operation, then set_error() is called passing the exception.