Version 1.9: TOML
Config file handling was revamped to fix common issues, and now supports reading TOML.
Adding options is significantly more powerful with support for things like
std::tuple
and std::array
, including with transforms. Several new
configuration options were added to facilitate a wider variety of apps. GCC
4.7 is no longer supported.
- Config files refactored, supports TOML (may become default output in 2.0) #362
- Added two template parameter form of
add_option
, allowingstd::optional
to be supported without a special import #285 string_view
now supported in reasonable places #300, #285immediate_callback
,final_callback
, andparse_complete_callback
added to support controlling the App callback order #292, #313- Multiple positional arguments maintain order if
positionals_at_end
is set. #306 - Pair/tuple/array now supported, and validators indexed to specific components in the objects #307, #310
- Footer callbacks supported #309
- Subcommands now support needs (including nameless subcommands) #317
- More flexible type size, more useful
add_complex
#325, [#370][] - Added new validators
CLI::NonNegativeNumber
andCLI::PositiveNumber
#342 - Transform now supports arrays #349
- Option groups can be hidden #356
- Add
CLI::deprecate_option
andCLI::retire_option
functions #358 - More flexible and safer Option
default_val
[#387][] - Backend: Cleaner type traits #286
- Backend: File checking updates [#341][]
- Backend: Using pre-commit to format, checked in GitHub Actions #336
- Backend: Clang-tidy checked again, CMake option now
CL11_CLANG_TIDY
#390 - Backend: Warning cleanup, more checks from klocwork #350, Effective C++ #354, clang-tidy #360, CUDA NVCC #365, cross compile #373, sign conversion #382, and cpplint #400
- Docs: CLI11 Tutorial now hosted in the same repository #304, #318, #374
- Bugfix: Fixed undefined behavior in
checked_multiply
#290 - Bugfix:
->check()
was adding the name to the wrong validator #320 - Bugfix: Resetting config option works properly #301
- Bugfix: Hidden flags were showing up in error printout #333
- Bugfix: Enum conversion no longer broken if stream operator added #348
- Build: The meson build system supported #299
- Build: GCC 4.7 is no longer supported, due mostly to GoogleTest. GCC 4.8+ is now required. #160
- Build: Restructured significant portions of CMake build system #394
Converting from CLI11 1.8:
- Some deprecated methods dropped
add_set*
should be replaced with->check
/->transform
andCLI::IsMember
since 1.8get_defaultval
was replaced byget_default_str
in 1.8- The true/false 4th argument to
add_option
is expected to be removed in 2.0, use->capture_default_str()
since 1.8