Index: base/functional.h |
diff --git a/base/functional.h b/base/functional.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fc5e8a0a113fbc22e098536a8e0a92e110aeae80 |
--- /dev/null |
+++ b/base/functional.h |
@@ -0,0 +1,28 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BASE_FUNCTIONAL_H_ |
+#define BASE_FUNCTIONAL_H_ |
+ |
+#include <functional> |
+#include <utility> |
+ |
+namespace base { |
+ |
+// std::less<> from C++14. |
+// Needed for improved flat containers API. |
+ |
+struct less { |
+ template <typename T, typename U> |
+ constexpr auto operator()(T&& lhs, U&& rhs) const |
+ -> decltype(std::forward<T>(lhs) < std::forward<U>(rhs)) { |
+ return std::forward<T>(lhs) < std::forward<U>(rhs); |
+ } |
+ |
+ using is_transparent = int; |
+}; |
+ |
+} // base |
+ |
+#endif // BASE_FUNCTIONAL_H_ |