Commit 4ebfa259156ae42fbd44a3aeb7fd73a2d6569480
1 parent
d74a2c65
Improve version and changelog
Showing
2 changed files
with
10 additions
and
2 deletions
CHANGELOG.md
| ... | ... | @@ -16,6 +16,9 @@ options. The project adheres to semantic versioning. |
| 16 | 16 | |
| 17 | 17 | * A new `ParseResult` object that is the immutable result of parsing. It |
| 18 | 18 | responds to the same `count` and `operator[]` as `Options` of 1.x did. |
| 19 | +* The function `ParseResult::arguments` returns a vector of the parsed | |
| 20 | + arguments to iterate through in the order they were provided. | |
| 21 | +* The symbol `cxxopts::version` for the version of the library. | |
| 19 | 22 | |
| 20 | 23 | ## 1.x |
| 21 | 24 | ... | ... |
include/cxxopts.hpp
| ... | ... | @@ -25,8 +25,6 @@ THE SOFTWARE. |
| 25 | 25 | #ifndef CXXOPTS_HPP_INCLUDED |
| 26 | 26 | #define CXXOPTS_HPP_INCLUDED |
| 27 | 27 | |
| 28 | -#define CXXOPTS_VERSION 2.0.0 | |
| 29 | - | |
| 30 | 28 | #include <cstring> |
| 31 | 29 | #include <cctype> |
| 32 | 30 | #include <exception> |
| ... | ... | @@ -40,6 +38,13 @@ THE SOFTWARE. |
| 40 | 38 | #include <unordered_set> |
| 41 | 39 | #include <vector> |
| 42 | 40 | |
| 41 | +namespace cxxopts | |
| 42 | +{ | |
| 43 | + static constexpr struct { | |
| 44 | + uint8_t major, minor, patch; | |
| 45 | + } version = {2, 0, 0}; | |
| 46 | +} | |
| 47 | + | |
| 43 | 48 | //when we ask cxxopts to use Unicode, help strings are processed using ICU, |
| 44 | 49 | //which results in the correct lengths being computed for strings when they |
| 45 | 50 | //are formatted for the help output | ... | ... |