stlab::task is a general-purpose polymorphic function wrapper. Instances of
stlab::task can store, move, and invoke any Callable target – functions, lambda expressions, bind expressions, or other function objects, as well as pointers to member functions and pointers to data members.
The stored callable object is called the target of
stlab::task. If an
stlab::task contains no target, it is called empty. Invoking the target of an empty
stlab::task results in
std::bad_function_call exception being thrown.
stlab::task is Similar to
std::function except it is not copyable and supports move-only and mutable callable targets which is especially useful for targets that may only be invoked once, often useful to deliver a message or payload in tasking or messaging system.
|(constructor)||Constructs a task|
|(destructor)||Default-destructs a task|
Compares a task for not equal an empty task
Checks if a given task is equal to an empty task(template function)
Exchanges two tasks
A type-erased nullary wrapper that supports mutable functions.(template class)