-
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.
-
This was fixed in 37fab4ee7a26e9c3af5a934fdeb2410ed13a7f54.
-
´Value´ and ´standard_value´ don't have a virtual destructor. When I understand the code right, this is intended, because they are used through ´shared_ptr´ and so its not required. Nevertheless, clang does warn about it, since at the point of the destructor call it can not check if the object has a final type. Adding the C++11 keyword ´final´ to ´standard_value´ avoids this warning.
-
Fixes #62. This fixes compiler warnings that are raised by MSVC. In one case the code that was warned about was never executed, but this compiles it out in that case to silence the warning.
-
This uses normal single quotes when on a Windows platform.
-
Adds generic parsing of types using `operator>>`, in particular allows parsing of floats and doubles.
-
Fixes #61. Commit 5e9f8225982e9711b548c886fe6b477cdefd0fd4 introduced duplicate definitions across separate translation units.
-
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.
-
* remove biicode support The company/startup died in 2015 and the open source project seems to be dead as well. * define compiler warning flags globally instead of locally for every binary * add support for cmake's find_package() (refs #52) This rewrite of the main CMakeLists.txt cleans up the way ICU flags are attached to the library target and adds the cmake helper files (cxxopts-config.cmake, cxxopts-config-version.cmake, cxxopts-targets.cmake) which are needed for exporting the cxxopts target. Cmake's find_package command uses these files when the library is consumed by another project. Additionally, two new tests have been added which build the example application via add_subdirectory and find_package. * removed target_sources from interface library Adding target_sources to interface libraries and exporting them is not supported in CMake 3.1 and 3.2. Furthermore, since it is a header, it is not needed at all. * use the *_LDFLAGS instead of *_LIBARIES when linking ICU The LIBRARIES variable seems to contain only the name and not the full path.
-
This alleviated an issue I had where during compilation, check_required was defined multiple times
-
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.
-
cleanup some code smells
-
Fixes #46. When an option had an implicit value, and an empty string was passed on the command line, the implicit value would be used instead.
-
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.
-
* Conditionally output all help groups on empty groups vector * Fix formatting
-
Fixes #37. A long option is required, a short option is not.
-
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.