2017-10-18 10:42:49 +03:00
|
|
|
# Changelog
|
2017-10-18 10:27:13 +03:00
|
|
|
|
2017-10-18 10:42:49 +03:00
|
|
|
This is the changelog for `cxxopts`, a C++11 library for parsing command line
|
|
|
|
options. The project adheres to semantic versioning.
|
|
|
|
|
2022-01-14 08:16:31 +03:00
|
|
|
## Unreleased
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2022-07-14 09:42:18 +03:00
|
|
|
* Support for multiple long names for the same option (= multiple long aliases)
|
2022-01-14 08:16:31 +03:00
|
|
|
* Add a `program()` function to retrieve the program name.
|
2022-07-11 13:46:01 +03:00
|
|
|
* Added a .clang-format file.
|
2023-02-12 23:30:11 +03:00
|
|
|
* Added iterator and printing for a ParseResult.
|
2022-01-14 08:16:31 +03:00
|
|
|
|
2022-07-13 00:22:01 +03:00
|
|
|
### Changed
|
|
|
|
|
|
|
|
* Cleanup exception code, add cxxopts::exceptions namespace.
|
|
|
|
|
2022-05-11 10:47:37 +03:00
|
|
|
### Bug Fixes
|
|
|
|
|
|
|
|
* Fix `arguments()` having no key for options that only have a short name.
|
|
|
|
|
2020-09-30 10:58:59 +03:00
|
|
|
## 3.0
|
2019-08-01 01:29:40 +03:00
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
* Only search for a C++ compiler in CMakeLists.txt.
|
|
|
|
* Allow for exceptions to be disabled.
|
2019-08-08 01:20:55 +03:00
|
|
|
* Fix duplicate default options when there is a short and long option.
|
2019-08-08 01:27:14 +03:00
|
|
|
* Add `CXXOPTS_NO_EXCEPTIONS` to disable exceptions.
|
2019-08-23 01:26:16 +03:00
|
|
|
* Fix char parsing for space and check for length.
|
2020-08-11 01:01:29 +03:00
|
|
|
* Change argument type in `Options::parse` from `char**` to `const char**`.
|
2020-09-30 10:58:59 +03:00
|
|
|
* Refactor parser to not change its arguments.
|
|
|
|
* `ParseResult` doesn't depend on a reference to the parser.
|
2021-10-20 23:47:55 +03:00
|
|
|
* Fixed several warnings and code quality issues.
|
|
|
|
* Improved formatting for help descriptions.
|
|
|
|
* Improve integer parsing.
|
2020-09-30 10:58:59 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
* A list of unmatched arguments is available in `ParseResult`.
|
2021-10-20 23:47:55 +03:00
|
|
|
* Support single letter options with argument attached.
|
|
|
|
* Use <optional> if it is present.
|
|
|
|
|
|
|
|
### Bug Fixes
|
|
|
|
|
|
|
|
* Fix missing option name in exception.
|
2019-08-01 01:29:40 +03:00
|
|
|
|
2018-05-07 11:18:04 +03:00
|
|
|
## 2.2
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
* Allow integers to have leading zeroes.
|
2018-11-07 10:52:40 +03:00
|
|
|
* Build the tests by default.
|
2019-06-18 11:17:24 +03:00
|
|
|
* Don't check for container when showing positional help.
|
2018-05-07 11:18:04 +03:00
|
|
|
|
2018-07-05 11:21:26 +03:00
|
|
|
### Added
|
|
|
|
|
|
|
|
* Iterator inputs to `parse_positional`.
|
2019-05-01 11:34:29 +03:00
|
|
|
* Throw an exception if the option in `parse_positional` doesn't exist.
|
2019-06-18 01:17:26 +03:00
|
|
|
* Parse a delimited list in a single argument for vector options.
|
2019-06-18 11:00:16 +03:00
|
|
|
* Add an option to disable implicit value on booleans.
|
2018-07-05 11:21:26 +03:00
|
|
|
|
2018-05-07 11:54:42 +03:00
|
|
|
### Bug Fixes
|
|
|
|
|
|
|
|
* Fix a warning about possible loss of data.
|
2018-07-05 10:53:53 +03:00
|
|
|
* Fix version numbering in CMakeLists.txt
|
2018-08-03 01:46:48 +03:00
|
|
|
* Remove unused declaration of the undefined `ParseResult::get_option`.
|
2018-11-07 10:50:43 +03:00
|
|
|
* Throw on invalid option syntax when beginning with a `-`.
|
2018-11-19 09:45:51 +03:00
|
|
|
* Throw in `as` when option wasn't present.
|
2018-11-20 00:25:24 +03:00
|
|
|
* Fix catching exceptions by reference.
|
2019-06-14 01:02:23 +03:00
|
|
|
* Fix out of bounds errors parsing integers.
|
2018-05-07 11:54:42 +03:00
|
|
|
|
2018-04-10 01:50:17 +03:00
|
|
|
## 2.1.1
|
|
|
|
|
|
|
|
### Bug Fixes
|
|
|
|
|
|
|
|
* Revert the change adding `const` type for `argv`, because most users expect
|
|
|
|
to pass a non-const `argv` from `main`.
|
|
|
|
|
2017-11-28 00:43:55 +03:00
|
|
|
## 2.1
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
* Options with implicit arguments now require the `--option=value` form if
|
|
|
|
they are to be specified with an option. This is to remove the ambiguity
|
|
|
|
when a positional argument could follow an option with an implicit value.
|
|
|
|
For example, `--foo value`, where `foo` has an implicit value, will be
|
|
|
|
parsed as `--foo=implicit` and a positional argument `value`.
|
2018-04-09 01:17:56 +03:00
|
|
|
* Boolean values are no longer special, but are just an option with a default
|
|
|
|
and implicit value.
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
* Added support for `std::optional` as a storage type.
|
|
|
|
* Allow the help string to be customised.
|
|
|
|
* Use `const` for the type in the `argv` parameter, since the contents of the
|
|
|
|
arguments is never modified.
|
2017-11-28 00:43:55 +03:00
|
|
|
|
2017-11-30 00:22:47 +03:00
|
|
|
### Bug Fixes
|
|
|
|
|
|
|
|
* Building against GCC 4.9 was broken due to overly strict shadow warnings.
|
2018-04-09 01:17:56 +03:00
|
|
|
* Fixed an ambiguous overload in the `parse_positional` function when an
|
|
|
|
`initializer_list` was directly passed.
|
|
|
|
* Fixed precedence in the Boolean value regex.
|
2017-11-30 00:22:47 +03:00
|
|
|
|
2017-10-18 10:42:49 +03:00
|
|
|
## 2.0
|
|
|
|
|
|
|
|
### Changed
|
2017-10-18 10:27:13 +03:00
|
|
|
|
|
|
|
* `Options::parse` returns a ParseResult rather than storing the parse
|
|
|
|
result internally.
|
2017-10-27 04:04:51 +03:00
|
|
|
* Options with default values now get counted as appearing once if they
|
|
|
|
were not specified by the user.
|
2017-10-18 10:42:49 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
* A new `ParseResult` object that is the immutable result of parsing. It
|
|
|
|
responds to the same `count` and `operator[]` as `Options` of 1.x did.
|
2017-11-13 09:57:26 +03:00
|
|
|
* The function `ParseResult::arguments` returns a vector of the parsed
|
|
|
|
arguments to iterate through in the order they were provided.
|
|
|
|
* The symbol `cxxopts::version` for the version of the library.
|
2017-11-15 09:56:25 +03:00
|
|
|
* Booleans can be specified with various strings and explicitly set false.
|
2017-10-18 10:42:49 +03:00
|
|
|
|
|
|
|
## 1.x
|
|
|
|
|
|
|
|
The 1.x series was the first major version of the library, with release numbers
|
|
|
|
starting to follow semantic versioning, after 0.x being unstable. It never had
|
|
|
|
a changelog maintained for it. Releases mostly contained bug fixes, with the
|
|
|
|
occasional feature added.
|