Template Function liberate::concurrency::command::create_context

Function Documentation

template<typename commandT, typename ...argsT>
inline std::unique_ptr<command_context_base> liberate::concurrency::command::create_context(command_type type, argsT&&... args)

A convenience function for creating the command context passes variadic arguments on to the parameters constructor.

The commandT template parameter is expected to:

  1. Be constructible with the type parameter below.

  2. To contain a params_type inner type, which can be constructed by forwarding the remaining arguments.

Parameters
  • type[in] The command type to create a context for.

  • args[in] Variable number of arguments passed to the command.

Returns

a unique_ptr<> of a context for the given command and arguments.