Version 2.6.0
This version adds finer grained control of when option callbacks are executed,
and further refinements in the help formatting. It also fixes a number of bugs
in type support and the ordering of options. The other major change is moving
Extra Validators to a new file which can be disabled for slightly faster
compilation if not used, and allowing additional future Validators to be easily
added.
Added
- Added option to align long options with a ratio via
long_option_alignment_ratio
in the formatter. This allows more control over
help output formatting. #1185 - Added support for
std::string_view
in theas<T>
method on options.
#1187 - Added flags on the formatter to disable formatting for the description and
footer, allowing custom formatting such as word art. #1150 - Added subcommand prefix matching as a modifier to
CLI::App
. Also included an
example of close matching logic. #1152 - Added additional fuzzing mechanics, including fuzzing subcommands, and
improved handling of edge cases. #1170 - Added new tests for array options and fixed ambiguity between tuple and
container conversions. #1136 - Added ability to use rvalue references in
add_flag
descriptions. #1173 - Added CMake presets for default and tidy builds. #1181
- Added several validator examples and documentation #1192
- Added permission validators for files and directories #1203
- Added fine grained control for option callback priority, and in what order
options including help execute in the processing sequence. #1226 - Added github action to link with future testing is oss-fuzz #1225
Changed
- Moved several of the validators to
ExtraValidators.hpp
and
ExtraValidators_inl.hpp
files, The compilation of these nonessential
validators can be disabled by settingCLI11_DISABLE_EXTRA_VALIDATORS
to
OFF
. Future additional validators will be behind a compile flag
CLI11_ENABLE_EXTRA_VALIDATORS
. All non-essential validators will be under
this option with version 3.0. #1192 - Updated processing order: requirements are now checked before callbacks,
avoiding unexpected side effects. #1186 - Updated minimum required CMake version to 3.14+. #1182
- Improved Meson build: support for building shared precompiled libraries,
pkgconfig, and header installation. #1167 - Improved fuzzing tests with new failure cases and extended coverage. #1164
- Updated CI to remove deprecated images and add new ones (Windows-2022/2025,
arm64, FreeBSD). #1172, #1178 - Updated license file to include the correct version number for packagers.
#1180
Fixed
- Fixed issue with IPV4 validator where it would allow a trailing
.
. #1192 - Fixed edge case where a missing config file and no default caused a segfault.
#1199 - Fixed issue with TOML multiline arrays when the first line contained only a
single character. #1196 - Fixed default value conversion errors when locales added thousands separators.
#1160 - Fixed multiple footer printing in help output for option groups. #1161
- Fixed incorrect argument order in extras error messages. #1162
- Fixed reversed argument order in unexpected argument error messages. #1158
- Fixed ambiguity with
vector<array>
options. #1147 - Fixed bug parsing negative floating point values without a leading zero.
#1140 - Fixed spelling mistake in
Error.hpp
. #1129 - Fixed compilation issue with MSVC 2017. #1143
- Fixed issue with default strings of arrays in config output. #1155
- Fixed fuzzing issues with NaNs and certain error pathways. #1138
- Fixed fuzzer misinterpreting
--sub1.-
as a short option. #1148 - Fixed issue where parse_order was not cleared on reset. #1218
- modify code to make compatible with /GR- option in MSVC #1206
- Fixed issue where the version flag would not take precedence over option
requirements #1226 - Fixed extra newlines being printed if a footer was in use #1229