gtopt::cli::command_line_parser class

Constructors, destructors, conversion operators

command_line_parser(int argc, char** argv)
Construct from argc/argv (skips argv[0]).
command_line_parser(std::vector<std::string> args) explicit
Construct from a vector of strings.

Public functions

auto allow_unregistered() -> command_line_parser&
auto options(const options_description& desc) -> command_line_parser&
auto parse_into(variables_map& vm) const -> void
Parse and fill the supplied variables_map.
auto positional(const positional_options_description& pos) -> command_line_parser&
auto unrecognized() const -> const std::vector<std::string>& noexcept

Function documentation

const std::vector<std::string>& gtopt::cli::command_line_parser::unrecognized() const noexcept

Return the list of unrecognised option tokens collected during parsing when allow_unregistered() was called. Empty if all options were known.