command_line_parser class
#include <gtopt/cli_options.hpp>
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.