Improve version and changelog

This commit is contained in:
Jarryd Beck 2017-11-13 17:57:26 +11:00
parent d74a2c65a5
commit 4ebfa25915
2 changed files with 10 additions and 2 deletions

View File

@ -16,6 +16,9 @@ options. The project adheres to semantic versioning.
* A new `ParseResult` object that is the immutable result of parsing. It * A new `ParseResult` object that is the immutable result of parsing. It
responds to the same `count` and `operator[]` as `Options` of 1.x did. responds to the same `count` and `operator[]` as `Options` of 1.x did.
* The function `ParseResult::arguments` returns a vector of the parsed
arguments to iterate through in the order they were provided.
* The symbol `cxxopts::version` for the version of the library.
## 1.x ## 1.x

View File

@ -25,8 +25,6 @@ THE SOFTWARE.
#ifndef CXXOPTS_HPP_INCLUDED #ifndef CXXOPTS_HPP_INCLUDED
#define CXXOPTS_HPP_INCLUDED #define CXXOPTS_HPP_INCLUDED
#define CXXOPTS_VERSION 2.0.0
#include <cstring> #include <cstring>
#include <cctype> #include <cctype>
#include <exception> #include <exception>
@ -40,6 +38,13 @@ THE SOFTWARE.
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
namespace cxxopts
{
static constexpr struct {
uint8_t major, minor, patch;
} version = {2, 0, 0};
}
//when we ask cxxopts to use Unicode, help strings are processed using ICU, //when we ask cxxopts to use Unicode, help strings are processed using ICU,
//which results in the correct lengths being computed for strings when they //which results in the correct lengths being computed for strings when they
//are formatted for the help output //are formatted for the help output