Releases: vietjtnguyen/argagg
Releases · vietjtnguyen/argagg
0.4.6
0.4.5
- Fixed bug in integer and float argument conversion specializations where
invalid conversions were not being correctly handled. Invalid conversions
(like "garbage" to float) will now throw an exception. Note though if the
as(default) overload is used (with a default value specified) then all
exceptions in the conversion result in the default being returned. - Changed base exception type for argagg exceptions from std::argument_error to
std::runtime_error - Now compiles with -Wpedantic
0.4.4
- Added some minor error handling to argagg::fmt_string()
0.4.3
- Added argagg::fmt_string() to format a string using the fmt program when
compiling on a unix platform. Degrades to an identity function when not
on a unix platform. - Added argagg::fmt_ostream as a convenience stream that will stream the
formatted string to the referenced final std::ostream when the
argagg::fmt_ostream destructs - Fixed bug when compiling with clang where the non-template implicit bool
operator was being selected when implicitly converting to an integer. By
making the implicit bool operator a specialization of the templated implicit
conversion operator the compiler should now select the correct overload.
0.4.2
- Fixed missing inline specifiers on argagg::convert::arg specializations,
fixes multiple definitions bug
0.4.1
- Fixed compiler errors when using clang with regards to some initialization list usage for empty containers and a false positive -Wreturn-stack-address treated as an error
0.4.0
- Changed argagg::definition::help and argagg::definition::flags to use std::string instead of const char*
- Fixed compilation error with clang
0.3.1
Minor documentation and test additions
0.3.0
- Added support for POSIX command line option behaviors
- Options (short) start with a hyphen (-) and long options start with two hyphens (--)
- Multiple short options can be grouped following a single hyphen
- -a -b -c can also be written -abc or -bac, etc.
- Option names are alpha numeric but long options may include hyphens
- -v is valid, --ftest-coverage is valid
- -# is not valid, --bad$option is not valid
- Short options can be provided arguments with or without whitespace delimiters
- -I /usr/local/include and -I/usr/local/include are equally valid
- Long options can be provided arguments with whitespace or equal sign delimiters
- --output test.txt and --output=test.txt are equivalent
- Options and positional arguments can be interleaved
- -- can be specified to treat all following arguments as positional arguments (i.e. not options)
- Added option definition validation
- Checks for malformed flags
- Checks for duplicate flags
- Added conversion functions for rest of fundamental integer types
- Built in conversion functions now utilize strtol(), strtoll(), strtof(), and strtod()
- Added char** argv overload of argagg::parser::parse()
- Removed argagg::optional, options now either receive arguments or they don't
- Added example derived from gengetopt documentation
- Expanded unit test coverage to 98%
- Added coveralls integration for code coverage reports
0.2.1
After an initial iteration this is an API I'm pretty happy with.