Template Function mcfp::make_hidden_option(ostring, const T&, std::string)

Function Documentation

template<typename T>
auto mcfp::make_hidden_option(ostring name, const T &v, std::string description)

Create an option with name name and with default value v. If T is void the option does not expect a value and is in fact a flag. This option will not be shown in the help / usage output.

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