This commit is contained in:
2022-03-14 14:37:41 +01:00
parent 97c93afeff
commit ce5bcc5897
2 changed files with 27 additions and 1 deletions

View File

@ -28,7 +28,9 @@ class Version {
(v1.major == v2.major and v1.minor == v2.minor and v1.revision < v2.revision));
}
friend bool operator>(const Version& v1, const Version& v2) { return not(v1 < v2); }
friend bool operator>(const Version& v1, const Version& v2) {
return not (v1 < v2) and not (v1 == v2);
}
friend bool operator<=(const Version& v1, const Version& v2) { return ((v1 == v2) or (v1 < v2)); }