1 #ifndef VERSIONCOMPARE_H_
2 #define VERSIONCOMPARE_H_
22 int parsedCurrent[3], parsedOther[3];
25 return std::lexicographical_compare(parsedCurrent, parsedCurrent + 3, parsedOther, parsedOther + 3);
34 static bool NotOlderThan(
const std::string& base,
const std::string& comp)
36 int parsedBase[3], parsedComp[3];
39 return !std::lexicographical_compare(parsedComp, parsedComp + 3, parsedBase, parsedBase + 3);
51 std::istringstream parser(input);
53 for(
int idx = 1; idx < 3; idx++)
56 parser >> result[idx];
61 #endif // VERSIONCOMPARE_H_
Compares string versions.
Definition: VersionCompare.h:11
static void parseVersion(int result[3], const std::string &input)
Definition: VersionCompare.h:49
static bool NewerThanCurrent(const std::string ¤t, const std::string &other)
Definition: VersionCompare.h:20
static bool NotOlderThan(const std::string &base, const std::string &comp)
Definition: VersionCompare.h:34