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

Unified Diff: base/containers/container_test_utils.h

Issue 2944523002: Improving flat containers interface. (Closed)
Patch Set: Review, round 4. Created 3 years, 6 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
Index: base/containers/container_test_utils.h
diff --git a/base/containers/container_test_utils.h b/base/containers/container_test_utils.h
index 251e2a03d4f664c252f20a250c2f9ff4671ddc3a..50b9c3b16601584a75b90a4d497f37ff40a314ff 100644
--- a/base/containers/container_test_utils.h
+++ b/base/containers/container_test_utils.h
@@ -30,6 +30,14 @@ class MoveOnlyInt {
return !operator==(lhs, rhs);
}
+ friend bool operator<(const MoveOnlyInt& lhs, int rhs) {
+ return lhs.data_ < rhs;
+ }
+
+ friend bool operator<(int lhs, const MoveOnlyInt& rhs) {
+ return lhs < rhs.data_;
+ }
+
friend bool operator<(const MoveOnlyInt& lhs, const MoveOnlyInt& rhs) {
return lhs.data_ < rhs.data_;
}

Powered by Google App Engine
This is Rietveld 408576698