OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
danakj
2017/06/26 19:33:12
Can this go in template_util.h? We haven't reprodu
dyaroshev
2017/06/26 22:40:42
Done
| |
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. | |
danakj
2017/06/26 19:33:12
remove this line
dyaroshev
2017/06/26 22:40:42
Done.
| |
15 | |
16 struct less { | |
17 template <typename T, typename U> | |
18 constexpr auto operator()(T&& lhs, U&& rhs) const | |
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; | |
danakj
2017/06/26 19:33:12
Refer to transparent docs here also please
dyaroshev
2017/06/26 22:40:42
Done
| |
24 }; | |
25 | |
26 } // base | |
danakj
2017/06/26 19:33:12
namespace base
dyaroshev
2017/06/26 22:40:42
Not applicable.
| |
27 | |
28 #endif // BASE_FUNCTIONAL_H_ | |
OLD | NEW |