Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: base/version.h

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/version.cc » ('j') | base/version.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/version.h
diff --git a/base/version.h b/base/version.h
index 85c99a355bdae61aa89144037430b44d34b2da3c..72599276c66ef5b320c8b9049f0ba9d517e10d18 100644
--- a/base/version.h
+++ b/base/version.h
@@ -43,8 +43,6 @@ class BASE_EXPORT Version {
// than the version of this object.
bool IsOlderThan(const std::string& version_str) const;
- bool Equals(const Version& other) const;
-
// Returns -1, 0, 1 for <, ==, >.
int CompareTo(const Version& other) const;
@@ -63,6 +61,14 @@ class BASE_EXPORT Version {
std::vector<uint32_t> components_;
};
+BASE_EXPORT bool operator==(const Version& v1, const Version& v2);
+BASE_EXPORT bool operator!=(const Version& v1, const Version& v2);
+BASE_EXPORT bool operator<(const Version& v1, const Version& v2);
+BASE_EXPORT bool operator<=(const Version& v1, const Version& v2);
+BASE_EXPORT bool operator>(const Version& v1, const Version& v2);
+BASE_EXPORT bool operator>=(const Version& v1, const Version& v2);
+BASE_EXPORT std::ostream& operator<<(std::ostream& stream, const Version& v);
brettw 2016/01/08 19:31:16 I think you need to include iosfwd so ostream is d
Rob Percival 2016/01/09 23:54:03 Done.
+
} // namespace base
// TODO(xhwang) remove this when all users are updated to explicitly use the
« no previous file with comments | « no previous file | base/version.cc » ('j') | base/version.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698