-
These were detected using -fsanitize=undefined parsing values equal to INT_MAX and INT_MIN.
-
* Parse 1 as "true" and 0 as "false" for boolean options.
-
Fixes #171. Allows invalid syntax for short options to be ignored.
-
Fixes #175. This was broken when throwing an exception on missing positional parameters in #169.
-
Fixes #169. It seems reasonable to throw an exception when an attempt is made to parse into positional parameters that don't exist.
-
String literals with the prefix `u8` now have the type `const char8_t[N]` in C++20. As a consequence the library does not compile in c++2a mode with GCC (you can't concatenate `std::basic_string<char>` and `const char8_t[]` as `char` and `char8_t` are different types).
-
Fixes #166.
-
The empty string caused the vector to have one element which caused the test at line 2041 to always fail.
-
Fixes #157. Fix the wording in the README about booleans.
-
Windows is broken and defines `min` and `max` as a macro, adding parentheses stops them from being expanded.
-
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 #132. Since the map of options is shared between Options and ParseResult, they should use a shared pointer instead of a reference so that ParseResult can be returned without referencing destroyed memory.
-
Fixes #143. There is no reason to make the tests optional.
-
Fixes #121. Removes the unused `ParseResult::get_option`.
-
Fixes #115. Read the version number out of `cxxopts.hpp` instead of having to duplicate it in CMakeLists.txt.
-
Fixes #109. Although we always used numbers in the ASCII range, it was in a `size_t`, leading to a warning about possible loss of data on some compilers.
-
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 #102. Don't show the default value when it is a boolean and the value is false. Note that this is a bit of a hack and the implementation should probably be reevaluated in the future.
-
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.