Template Function mcfp::make_option(std::string_view, const T&, std::string_view)

Function Documentation

template<typename T, std::enable_if_t<not detail::is_container_type_v<T>, int> = 0>
auto mcfp::make_option(std::string_view name, const T &v, std::string_view description)

Create an option with name name and with a default value v.

If the type of T is a container (std::vector e.g.) the option can be specified multiple times on the command line.

The name name may end with a comma and a single character. This last character will then be the short version whereas the leading characters make up the long version.

Template Parameters

T – The type of the option

Parameters
  • name – The name of the option

  • v – The default value to use

  • description – The help text for this option

Returns

auto The option object created