Repository navigation
Highlights
- C++23 modernization (
cxx_std_23): usesstd::optional::and_then,std::span,std::from_chars, concepts, and ranges. - Bug & UB fixes:
- Fixed UB on dash-only tokens (
"-","---") and empty-name"--=value"tokens. - Fixed missing
boolparsing for positionalget<bool>(index). - Fixed overload collision and lvalue-binding issues on deprecated default-value overloads.
- Fixed
CMakeLists.txtheader install layout (include/flags.hinstead ofinclude/include/flags.h) and addedARCH_INDEPENDENTpackage version support.
- Fixed UB on dash-only tokens (
- Parsing & API improvements:
- Strict, locale-independent numeric parsing via
std::from_chars(rejects trailing garbage, floats-as-int, overflow, and negative unsigned values). - Negative number values (
--offset -5,--delta -3.14) and case-insensitive boolean falsities. - Last-wins semantics for repeated flags on
get<T>and command-line-ordered merging across mixed aliases onget_multiple<T>(keys...). - Added
program(),contains(),keys(), andstd::span<const char* const>/const char* const*constructors.
- Strict, locale-independent numeric parsing via
- Testing & CI:
- Migrated unit tests from
mettletodoctestvia CMake/CTest (eliminatingmalloc/delete[]UB in the test fixture and adding a multi-TU ODR test). - Removed obsolete
build.bfgand expanded CI across Ubuntu (GCC & Clang + ASan/UBSan), macOS (AppleClang + ASan/UBSan), Windows (MSVC), and cross-platform CMakefind_packagechecks.
- Migrated unit tests from
Full changelog: v1.2...v2.0.0