1# Changelog 2 3This is the changelog for `cxxopts`, a C++11 library for parsing command line 4options. The project adheres to semantic versioning. 5 6## 3.0 7 8### Changed 9 10* Only search for a C++ compiler in CMakeLists.txt. 11* Allow for exceptions to be disabled. 12* Fix duplicate default options when there is a short and long option. 13* Add `CXXOPTS_NO_EXCEPTIONS` to disable exceptions. 14* Fix char parsing for space and check for length. 15* Change argument type in `Options::parse` from `char**` to `const char**`. 16* Refactor parser to not change its arguments. 17* `ParseResult` doesn't depend on a reference to the parser. 18 19### Added 20 21* A list of unmatched arguments is available in `ParseResult`. 22 23## 2.2 24 25### Changed 26 27* Allow integers to have leading zeroes. 28* Build the tests by default. 29* Don't check for container when showing positional help. 30 31### Added 32 33* Iterator inputs to `parse_positional`. 34* Throw an exception if the option in `parse_positional` doesn't exist. 35* Parse a delimited list in a single argument for vector options. 36* Add an option to disable implicit value on booleans. 37 38### Bug Fixes 39 40* Fix a warning about possible loss of data. 41* Fix version numbering in CMakeLists.txt 42* Remove unused declaration of the undefined `ParseResult::get_option`. 43* Throw on invalid option syntax when beginning with a `-`. 44* Throw in `as` when option wasn't present. 45* Fix catching exceptions by reference. 46* Fix out of bounds errors parsing integers. 47 48## 2.1.1 49 50### Bug Fixes 51 52* Revert the change adding `const` type for `argv`, because most users expect 53 to pass a non-const `argv` from `main`. 54 55## 2.1 56 57### Changed 58 59* Options with implicit arguments now require the `--option=value` form if 60 they are to be specified with an option. This is to remove the ambiguity 61 when a positional argument could follow an option with an implicit value. 62 For example, `--foo value`, where `foo` has an implicit value, will be 63 parsed as `--foo=implicit` and a positional argument `value`. 64* Boolean values are no longer special, but are just an option with a default 65 and implicit value. 66 67### Added 68 69* Added support for `std::optional` as a storage type. 70* Allow the help string to be customised. 71* Use `const` for the type in the `argv` parameter, since the contents of the 72 arguments is never modified. 73 74### Bug Fixes 75 76* Building against GCC 4.9 was broken due to overly strict shadow warnings. 77* Fixed an ambiguous overload in the `parse_positional` function when an 78 `initializer_list` was directly passed. 79* Fixed precedence in the Boolean value regex. 80 81## 2.0 82 83### Changed 84 85* `Options::parse` returns a ParseResult rather than storing the parse 86 result internally. 87* Options with default values now get counted as appearing once if they 88 were not specified by the user. 89 90### Added 91 92* A new `ParseResult` object that is the immutable result of parsing. It 93 responds to the same `count` and `operator[]` as `Options` of 1.x did. 94* The function `ParseResult::arguments` returns a vector of the parsed 95 arguments to iterate through in the order they were provided. 96* The symbol `cxxopts::version` for the version of the library. 97* Booleans can be specified with various strings and explicitly set false. 98 99## 1.x 100 101The 1.x series was the first major version of the library, with release numbers 102starting to follow semantic versioning, after 0.x being unstable. It never had 103a changelog maintained for it. Releases mostly contained bug fixes, with the 104occasional feature added. 105