Implement relational operators on Basic_version class; Improve documentation; Fix bug in parser regarding prerelease token treatment on transition between prerelease and build parsing; Add unit tests for missing cases

This commit is contained in:
Marko Zivanovic
2015-10-08 23:27:01 +02:00
parent 1cc5568547
commit 284aa77e13
10 changed files with 155 additions and 57 deletions
+2 -2
View File
@@ -44,9 +44,9 @@ namespace {
const vector<Transition>& transitions, string& target, Validator validate) {
for (const auto& t : transitions) {
if (c == get<0>(t)) {
if (get<2>(t)) get<2>(t)(target);
prev_phase = phase;
phase = get<1>(t);
if (get<2>(t)) get<2>(t)(target);
return;
}
}
@@ -76,7 +76,7 @@ namespace {
namespace version {
Version_data Semver200_parser::parse(const string& s) {
Version_data Semver200_parser::parse(const string& s) const {
string major;
string minor;
string patch;