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

Unified Diff: base/test/move_only_int.h

Issue 2944523002: Improving flat containers interface. (Closed)
Patch Set: Other platforms compilation 2. Created 3 years, 5 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 | « base/template_util_unittest.cc ('k') | cc/output/direct_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/move_only_int.h
diff --git a/base/containers/container_test_utils.h b/base/test/move_only_int.h
similarity index 89%
rename from base/containers/container_test_utils.h
rename to base/test/move_only_int.h
index 251e2a03d4f664c252f20a250c2f9ff4671ddc3a..50b9c3b16601584a75b90a4d497f37ff40a314ff 100644
--- a/base/containers/container_test_utils.h
+++ b/base/test/move_only_int.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_;
}
« no previous file with comments | « base/template_util_unittest.cc ('k') | cc/output/direct_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698