-
This is far from ideal, but it's the first step in moving the parse result to an immutable object so that the parser can be reused.
-
Adds generic parsing of types using `operator>>`, in particular allows parsing of floats and doubles.
-
Fixes #39. Closes #40. This is an overhaul of the way that integer arguments are parsed. Instead of using std::istream, which allows, for example, negative integers for unsigned types, we use our own parser. This allows us to do proper range checking depending on the type, and to correctly check for negative values passed to unsigned types. This also allows the handling of base 16 numbers.
-
Fixes #57. Allows spaces after the comma between the short and long option specification.
-
Fixes #50. This enables -Wall -Wextra -Wshadow and sets -Werror so that the build fails if there are any warnings. All warnings that came up are also fixed
-
Fixes #44. Adds a helper function for checking required options.
-
Fixes #47. Adds support for options that only have a short option.
-
Fixes #36. This fixes handling arguments passed after `--` when no positional arguments have been declared, or when the positional arguments have all been used up. The bug was that the extra arguments were lost. Now they are retained in the modified argv.
-
Fixes #33. This PR uses cmake's interface library feature: An INTERFACE library target does not directly create build output, though it may have properties set on it and it may be installed, exported and imported. This makes it easier to include the header only library in a cmake project. After using add_subdirectory on the cxxopts directory, one simply needs to include cxxopts in their target_link_libraries, which will allow the user's target to inherit the properties of the cxxopts header library (see changes to example and test).
-
Closes #32. This adds numbers as allowed values in all parts of short and long option specifiers.
-
Fixes #30. The positional arguments are not overwritten when they have already been given on the command line.