OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_CONTAINERS_FLAT_SET_H_ | 5 #ifndef BASE_CONTAINERS_FLAT_SET_H_ |
6 #define BASE_CONTAINERS_FLAT_SET_H_ | 6 #define BASE_CONTAINERS_FLAT_SET_H_ |
7 | 7 |
| 8 #include <functional> |
| 9 |
8 #include "base/containers/flat_tree.h" | 10 #include "base/containers/flat_tree.h" |
9 | 11 |
10 namespace base { | 12 namespace base { |
11 | 13 |
12 // flat_set is a container with a std::set-like interface that stores its | 14 // flat_set is a container with a std::set-like interface that stores its |
13 // contents in a sorted vector. | 15 // contents in a sorted vector. |
14 // | 16 // |
15 // Please see //base/containers/README.md for an overview of which container | 17 // Please see //base/containers/README.md for an overview of which container |
16 // to select. | 18 // to select. |
17 // | 19 // |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 template <class Key, class Compare = std::less<Key>> | 120 template <class Key, class Compare = std::less<Key>> |
119 using flat_set = typename ::base::internal::flat_tree< | 121 using flat_set = typename ::base::internal::flat_tree< |
120 Key, | 122 Key, |
121 Key, | 123 Key, |
122 ::base::internal::GetKeyFromValueIdentity<Key>, | 124 ::base::internal::GetKeyFromValueIdentity<Key>, |
123 Compare>; | 125 Compare>; |
124 | 126 |
125 } // namespace base | 127 } // namespace base |
126 | 128 |
127 #endif // BASE_CONTAINERS_FLAT_SET_H_ | 129 #endif // BASE_CONTAINERS_FLAT_SET_H_ |
OLD | NEW |