Improve compatibility with older compilers (GCC 4.8); Fix bug with string comparison; Improve compatibility with different Boost versions (testing).

This commit is contained in:
Marko Zivanovic
2015-10-09 11:28:55 +02:00
parent 2e39070287
commit 65832925b8
6 changed files with 39 additions and 14 deletions
+3 -1
View File
@@ -43,7 +43,9 @@ namespace {
int compare_prerel_identifiers(const Prerelease_identifier& l, const Prerelease_identifier& r) {
if (l.second == Identifier_type::alnum && r.second == Identifier_type::alnum) {
return l.first.compare(r.first);
auto cmp = l.first.compare(r.first);
if (cmp == 0) return cmp;
return cmp > 0 ? 1 : -1;
} else if (l.second == Identifier_type::alnum && r.second == Identifier_type::num) {
return 1;
} else if (l.second == Identifier_type::num && r.second == Identifier_type::alnum) {