Argagg Versions Save

A simple C++11 command line argument parser

0.4.6

6 years ago
  • Added use of argagg::fmt_ostream in gengetopt_main1 example
  • Merged pull request #12
    • replace static_cast w/ non-zero comparison to avoid compiler warnings on MSVC
  • Typo fixes

0.4.5

7 years ago
  • 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<T>(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

7 years ago
  • Added some minor error handling to argagg::fmt_string()

0.4.3

7 years ago
  • 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

7 years ago
  • Fixed missing inline specifiers on argagg::convert::arg specializations, fixes multiple definitions bug

0.4.1

7 years ago
  • 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

7 years ago
  • Changed argagg::definition::help and argagg::definition::flags to use std::string instead of const char*
  • Fixed compilation error with clang

0.3.1

7 years ago

Minor documentation and test additions

0.3.0

7 years ago
  • 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

7 years ago

After an initial iteration this is an API I'm pretty happy with.