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 namespace base { | |
12 | |
13 // std::less<> from C++14. | |
14 // Needed for improved flat containers API. | |
15 | |
16 struct less { | |
17 template <typename T, typename U> | |
18 constexpr auto operator()(T&& lhs, U&& rhs) const | |
vmpstr
2017/06/26 15:35:53
"bool operator(...) const", since std::less::opera
dyaroshev
2017/06/26 16:19:29
This is how std::less is defined http://en.cpprefe
vmpstr
2017/06/26 16:27:32
Oh interesting. I was just looking at general std:
| |
19 -> decltype(std::forward<T>(lhs) < std::forward<U>(rhs)) { | |
20 return std::forward<T>(lhs) < std::forward<U>(rhs); | |
21 } | |
22 | |
23 using is_transparent = int; | |
24 }; | |
25 | |
26 } // base | |
27 | |
28 #endif // BASE_FUNCTIONAL_H_ | |
OLD | NEW |