CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
This version improves support for alternative build systems, like Meson and Bazel. The single-include file now is in its own subdirectory. Several smaller fixes as well.
get_subcommand_no_throw
#1016
single-include
folder #1030 & #1036
app.set_failure_message(...)
-> app.failure_message(...)
#1018
RequiredError
#1029
Full Changelog: https://github.com/CLIUtils/CLI11/compare/v2.4.1...v2.4.2
A transitive include that might be present in some standard libraries is now included directly. Also fixes a test on architectures that need libatomic linked and fixes an inadvertent breaking change regarding unused defaults for config files.
Full Changelog: https://github.com/CLIUtils/CLI11/compare/v2.4.0...v2.4.1
This version adds Unicode support, support for TOML standard including multiline strings, digit separators, string escape sequences,and dot notation. An initial round of a fuzzer was added to testing which has caught several bugs related to config file processing, and a few other edge cases not previously observed.
--sub1.field
#789
sum_string_vector
#893
Full Changelog: https://github.com/CLIUtils/CLI11/compare/v2.3.2...v2.4.0
This version provides a few fixes collected over the last three months before adding features for 2.4.
lexical_cast
, making it easier to extend for custom template types #820disable_flag_override
#800]make_description
min option output #808Full Changelog: https://github.com/CLIUtils/CLI11/compare/v2.3.1...v2.3.2
A function implementation was missing after the pre-compile move, missed due to the fact we lost 100% after losing coverage checking. We are working on filling out 100% coverage again to ensure this doesn't happen again!
This version adds a pre-compiled mode to CLI11, which allows you to precompile the library, saving time on incremental rebuilds, making CLI11 more competitive on compile time with classic compiled CLI libraries. The header-only mode is still default, and is not yet distributed via binaries.
CLI11_PRECOMPILED
as an option. #762<functional>
in FormatterFwd
#727Macros.hpp
to Error.hpp
#755split_program_name
single file name error #740Full Changelog: https://github.com/CLIUtils/CLI11/compare/v2.2.0...v2.3.0
New features include support for output of an empty vector, a summing option policy that can be applied more broadly, and an option to validate optional arguments to discriminate from positional arguments. A new validator to check for files on a default path is included to allow one or more default paths for configuration files or other file arguments. A number of bug fixes and code cleanup for various build configurations. Clean up of some error outputs and extension of existing capability to new types or situations.
There is a possible minor breaking change in behavior of certain types which wrapped an integer, such as std::atomic<int>
or std::optional<int>
when used in a flag. The default behavior is now as a single argument value vs. summing all the arguments. The default summing behavior is now restricted to pure integral types, int64_t, int, uint32_t, etc. Use the new sum
multi option policy to revert to the older behavior. The summing behavior on wrapper types was not originally intended.
MultiOptionPolicy::Sum
and refactor the add_flag
to fix a bug when using std::optional<bool>
as type. #709
.validate_optional_arguments()
to support discriminating positional arguments from vector option arguments. #668
CLI::FileOnDefaultPath
to check for files on a specified default path. #698
=XXXX
to [XXXXX]
to make it clearer. #666
The name restrictions for options and subcommands are now much looser, allowing a wider variety of characters than before, even spaces can be used (use quotes to include a space in most shells). The default configuration parser was improved, allowing your configuration to sit in a larger file. And option callbacks have a few new settings, allowing them to be run even if the option is not passed, or every time the option is parsed.
force_callback
& trigger_on_parse
added, allowing a callback to always run on parse even if not present or every time the option is parsed #631
CONFIGURE_DEPENDS
if CLI11 is the main project #633