-
Fixes #357.
-
* Fixes #240: Multiple long option names / aliases * We now use a vector of long option names instead of a single name * When specifying an option, you can provide multiple names separated by commas, at most one of which may have a length of 1 (not necessarily the first specified name). The length-1 name is the single-hyphen switch (the "short name"). * Hashing uses the first long name * Option help currently only uses the first long name.
-
* Fixes #345, fixes #346, regards #340: Put exceptions in a sub-namespace and renamed them accordingly. * Also fixed some "loose ends" regarding namespace indentation which were missing in PR #350. * Dropped `required_option_missing` as it is unused.
-
* Solve `arguments()` showing empty keys when there is only a short option.
-
Fixes 323. Adds a function to retrieve the program name.
-
Fixes #312.
-
Fixes #204.
-
* Support option value being attached after the option without a space in between. e.g. -j5
-
…ic flags are set (#238) Makes some fixes to satisfy various strict warnings.
-
Fixes #257. The input array is not modified, so we can declare this as `char const* const*`.
-
Major refactor of the parsing code organisation to improve encapsulation and not modify the input arguments. The returned result no longer has pointers into the original option specification.
-
`cxxopts` doesn't modify the contents of the argv strings. This changes the parse function to take a reference to a `const char**`.
-
* Fixes #245: * Added a new exception type: `option_has_no_value_exception`; throwing it when an option has no value we can cast with `as()`, instead of an `std::domain_error`. * The `OptionValue` type now holds a pointer to the long option name (in its corresponding key within ParseResults's `m_results` field.
-
Fixes #197. Don't parse default options twice when there is a short and long option.
-
Allow adding options with a single initializer list.
-
Improve parsing into std::vector so that a single argument can take a list.
-
* Parse 1 as "true" and 0 as "false" for boolean options.
-
Fixes #171. Allows invalid syntax for short options to be ignored.
-
Fixes #169. It seems reasonable to throw an exception when an attempt is made to parse into positional parameters that don't exist.
-
g++ 8.2.0 refuses to compile the test suite because of polymorphic types that are caught by value. They shall be caught by reference instead.
-
Fixes #124.
-
Fixes #101. Allows leading zeroes in the integer parser.
-
Allows unrecognised options to be left alone by the parser without throwing an exception.
-
This reverts commit 0f819a5cabb611ada4c41a5208c6bf1178f804be.
-
* Added const to argv type for better interoperability.
-
Fixes #93. This adds C++17 only support for `std::optional` values for command line parameters.
-
Fixes #96. Default values of options not specified on the command line had a `count` of 1. It would be better if they had a count of 0 because they were not actually specified, so that count is only for options given by the user.
-
* Add default "default" value of "false" to boolean options, therefore allowing to call result["boolOpt"].as<bool>() without throwing an exception.
-
Fixes #83. Adds an overload for positional arguments taking a `std::initializer_list`. When using an `initializer_list` with one argument, the function call is ambiguous matching both `std::string` and `std::vector<std::string>`.
-
Fixes #84. Implicit values are not handled very well. For example: --foo false true --foo --bar In the first, `false` is an argument to `--foo`, and then `true` is a positional argument. In the second, because of the hyphen in `--bar`, `--foo` is parsed with its implicit value. This seems inconsistent and unintuitive. Better is that implicit values *never* consume the next parameter to be completely consistent. This means that values with an implicit parameter *must* be specified using the `--option=value` form.
-
The parsing for boolean options was broken by 6c9bae4a07 which added implicit and default values, and the ability to parse boolean strings. Having an option after the boolean tried to parse that into the boolean instead of as a positional parameter. See #84 for the bug report.