Because std::function is designed with multiple executions in mind there is no possibility to move arguments to the callable object on invocation. However, since base::task can be called only once it is possible to guarantee that arguments to the callable stored by the task can be passed via move. This would allow to use moveable only types as arguments.
Because
std::functionis designed with multiple executions in mind there is no possibility to move arguments to the callable object on invocation. However, sincebase::taskcan be called only once it is possible to guarantee that arguments to the callable stored by the task can be passed via move. This would allow to use moveable only types as arguments.