task¶
Defined in ssts/task.hpp
-
class task¶
Move-only callable object.
This class represents a callable object. Can be initialized with any invocable type that supports operator(). Internally the class implements a type-erasure idiom to accept any callable signature without exposing it to the outside.
Public Functions
-
template<typename FunctionType>
inline explicit task(FunctionType &&f)¶ Default constructor.
Creates a task instance with the given callable object. The callable object can be e.g. a lambda function, a functor, a free function or a class method bound to an object.
- Parameters
f – Callable parameterless object wrapped within this task instance.
-
inline task(task &&other) noexcept¶
Move constructor.
Move constructs a task instance to this.
- Parameters
other – task object.
-
inline void operator()()¶
operator().
Invokes a task.
-
template<typename FunctionType>