This version adds a FileSize validator, a PositionalOnly prefix command mode, and more control over config file generation. It also contains a large set of bug fixes from a systematic audit of the parsing, config, help formatting, string handling, and type conversion code, along with performance improvements that remove unnecessary copies in hot paths.
Added
- Added a
FileSizevalidator to check minimum and maximum file sizes. #1305 - Added
PrefixCommandMode::PositionalOnly, which restores the pre-2.6.2 prefix command behavior as an opt-in mode: only a positional argument or the--separator triggers prefix mode, and unrecognized options are collected as extras. #1382 - Added an option to write only the active subcommand defaults when generating a config file. #1314
Changed
- Improved performance by removing unnecessary string and container copies in parsing and validator hot paths. #1368
- Improved the performance of string splitting by replacing a
stringstreamwith a find-based loop. #1396 - Sorted the
excludesandneedssets by name for stable help output. #1308 - Removed
en_US.UTF-8from the unicode locale fallback list. #1312 - Modernization and portability fixes: added missing standard includes, exported
CLI::Numberfrom the C++20 module, and cleaned up the warning lists. #1367 - Aligned the Meson build with wrapdb policy by removing
disable_auto_iffor subprojects. #1349
Fixed
- Fixed
require_subcommandmaximum enforcement for dot notation and for disabled fallthrough, dot-notation subcommands with Windows-style prefixes,get_optionsconst/non-const consistency, and a crash when parsing withargc == 0. #1363, #1384 - Fixed missing symbol export from the precompiled shared library on macOS. #1387
- Fixed double indentation of nested option groups in help output. #1371, #1379
- Fixed config reading and writing bugs: section headers with trailing comments, one-line multiline comments, embedded delimiters with the
Joinpolicy, and multiline values for indented keys. #1369, #1361 - Fixed help formatting issues: hidden positionals appearing in the usage line, long subcommand names running into their descriptions, and
ExtrasErrorreporting the wrong error name. #1369 - Fixed
ignore_caseandignore_underscoreso both apply when used together. #1358 - Fixed string handling edge cases in
split_up,remove_quotes,append_codepoint, andescape_detect. #1364 - Fixed type conversion edge cases: negative input to unsigned types, whitespace-only floating point input, containers of pairs with an odd element count, large integer sums, and the
Joinpolicy with default values. #1362 - Fixed stale processed values being returned after
Option::clear(). #1360 - Fixed out-of-bounds reads in the non-codecvt narrow/widen conversion paths used under C++26. #1359
- Fixed infinite recursion on subcommand option groups with fallthrough enabled. #1316
- Fixed empty strings given to wrapper types such as
std::optionalto consistently produce a default-constructed value. #1340 - Fixed
CLI::ExistingFileto reject an empty filename with a clear error. #1351 - Fixed an empty description on a modified
Transformer. #1345 - Fixed unsigned wraparound in
split_program_namefor command lines without spaces. #1339 - Fixed
FileOnDefaultPathwith an empty default path, andPositiveNumberrejecting subnormal values. #1366 - Fixed compilation with libc++/clang in C++26 mode. #1326
- Fixed the case of the
shell32library name in CMake. #1347 - Removed the
statickeyword from the precompiled library definition in CMake. #1304
Documentation
- Clarified the behavior of the
prefix_commandoverloads. #1310 - Documented the Catch2 dependency for the test build. #1342
- Corrected documentation errors, including the
AsSizeValueexample, theApp::required()doc, and validator comments. #1304, #1366 - Modernized some documentation. #1336
- Moved the tutorial book into the Doxygen documentation, modernized the HTML output with doxygen-awesome-css, and reorganized the sidebar navigation. #1390, #1392, #1397, #1398
- Corrected errors found in a documentation review. #1394
- Split the documentation into Guide and Examples sections and filled gaps in the guide. #1400
Internal
- Added a
devCMake preset and workflow for faster local iteration using the precompiled library and ccache. #1387 - Added a CUDA test for the single-header build. #1381
- Refactored the duplicated parse-completion pipeline and removed dead code. #1365
- Moved static
std::stringreference initializers to helper functions. #1335 - Routed formatter label fallback through an internal helper as a step toward internationalization support. #1320
- Cleaned up the CMake logic for finding Catch2 and Boost, and corrected the example test regular expressions. #1325, #1322
- Reorganized the GitHub workflows and reduced CI build times. #1323, #1387
- Added C++26 CI coverage (GCC, and clang with modules), and made codecov wait for all coverage uploads. #1388, #1391
- Tidied the configuration files in the root directory. #1393
- Attached the source packages to tagged releases, wrote the release notes from the changelog, and added a CI check for a changelog entry on every build. #1401, #1402, #1403