|
execution 1.0.1
Portable task execution, timers, and process lifecycle
|
Type-erased, move-only callable with signature R(Args...) (or noexcept variant). More...
#include <task.hpp>
Public Member Functions | |
| auto | relocation_concept () const noexcept -> const concept_t * |
| Returns the vtable needed to relocate, invoke, or destroy this task's target without depending on its concrete type. | |
| auto | relocation_invoke () const noexcept -> invoke_t |
| Returns the function used to invoke this task's target. | |
| auto | relocation_source () noexcept -> void * |
| Returns the address of this task's inline model storage. | |
| task_ (const concept_t *vtable_ptr, invoke_t invoke_fn, void *source) noexcept | |
| Constructs a task by relocating the target described by (vtable_ptr, invoke_fn) out of source, without depending on the target's concrete type. | |
| constexpr | task_ (std::nullptr_t) noexcept |
| task_ (const task_ &)=delete | |
| task_ (const task_ &&)=delete | |
| task_ (task_ &&x) noexcept | |
| template<class F, std::enable_if_t<!NoExcept||std::is_nothrow_invocable_v< F, Args... >, bool > = true> | |
| task_ (F &&f) | |
| auto | operator= (const task_ &) -> task_ &=delete |
| auto | operator= (task_ &&x) noexcept -> task_ & |
| auto | operator= (std::nullptr_t) noexcept -> task_ & |
| template<class F> | |
| auto | operator= (F &&f) -> std::enable_if_t<!NoExcept||std::is_nothrow_invocable_v< decltype(f), Args... >, task_ & > |
| void | swap (task_ &x) noexcept |
| operator bool () const | |
| auto | target_type () const noexcept -> const std::type_info & |
| template<class T> | |
| auto | target () -> T * |
| template<class T> | |
| auto | target () const -> const T * |
| template<class... Brgs> | |
| auto | operator() (Brgs &&... brgs) noexcept(NoExcept) -> R |
Type-erased, move-only callable with signature R(Args...) (or noexcept variant).
Mutable operator() supports moving arguments through for single invocations. Compare to nullptr when empty; use target() / target_type() for runtime type queries.
|
inlinenoexcept |
Constructs a task by relocating the target described by (vtable_ptr, invoke_fn) out of source, without depending on the target's concrete type.
|
inlinenodiscardnoexcept |
Returns the address of this task's inline model storage.