Skip to content

v3.0.0

Compare
Choose a tag to compare
@jarro2783 jarro2783 released this 02 May 20:39
· 78 commits to master since this release

This is a major new release. The most significant change is that the parser now returns an object with the parse result, and does not modify argc or argv. The result object does not depend on the parser, so the following is now possible:

auto result = options.parse(argc, argv);
return result;

What's Changed

Changed

  • Only search for a C++ compiler in CMakeLists.txt.
  • Allow for exceptions to be disabled.
  • Fix duplicate default options when there is a short and long option.
  • Add CXXOPTS_NO_EXCEPTIONS to disable exceptions.
  • Fix char parsing for space and check for length.
  • Change argument type in Options::parse from char** to const char**.
  • Refactor parser to not change its arguments.
  • ParseResult doesn't depend on a reference to the parser.
  • Fixed several warnings and code quality issues.
  • Improved formatting for help descriptions.
  • Improve integer parsing.

Added

  • A list of unmatched arguments is available in ParseResult.
  • Support single letter options with argument attached.
  • Use if it is present.

Bug Fixes

  • Fix missing option name in exception.