OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BASE_FUNCTIONAL_H_ |
| 6 #define BASE_FUNCTIONAL_H_ |
| 7 |
| 8 #include <functional> |
| 9 #include <utility> |
| 10 |
| 11 #include "base/type_traits.h" |
| 12 |
| 13 namespace base { |
| 14 |
| 15 // std::less<> from C++14. |
| 16 // Needed for improved flat containers API. |
| 17 |
| 18 struct less { |
| 19 template <typename T, typename U> |
| 20 constexpr auto operator()(T&& lhs, U&& rhs) const |
| 21 -> decltype(std::forward<T>(lhs) < std::forward<U>(rhs)) { |
| 22 return std::forward<T>(lhs) < std::forward<U>(rhs); |
| 23 } |
| 24 |
| 25 using is_transparent = int; |
| 26 }; |
| 27 |
| 28 } // base |
| 29 |
| 30 #endif // BASE_FUNCTIONAL_H_ |
OLD | NEW |