Defined in ssts/task.hpp

class ssts::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.

  • f: Callable parameterless object wrapped within this task instance.

inline task(task &&other) noexcept

Move constructor.

Move constructs a task instance to this.

  • other: task object.

inline void operator()()


Invokes a task.

inline void invoke()


Invokes a task. Explicit overload of operator().