| Index: base/containers/flat_set.h
|
| diff --git a/base/containers/flat_set.h b/base/containers/flat_set.h
|
| index d51dd2678335927485fd61e7bfeb5e4c2920e62f..fcfd7200cafa53bf00e47a1aa356d94cdb22b4b0 100644
|
| --- a/base/containers/flat_set.h
|
| +++ b/base/containers/flat_set.h
|
| @@ -5,9 +5,8 @@
|
| #ifndef BASE_CONTAINERS_FLAT_SET_H_
|
| #define BASE_CONTAINERS_FLAT_SET_H_
|
|
|
| -#include <functional>
|
| -
|
| #include "base/containers/flat_tree.h"
|
| +#include "base/functional.h"
|
|
|
| namespace base {
|
|
|
| @@ -23,6 +22,8 @@ namespace base {
|
| // - Low overhead, especially for smaller sets.
|
| // - Performance is good for more workloads than you might expect (see
|
| // overview link above).
|
| +// - Supports C++14 set interface.
|
| +// - Uses base::less which allows for an easy use with smart pointers.
|
| //
|
| // CONS
|
| //
|
| @@ -82,31 +83,43 @@ namespace base {
|
| // const_reverse_iterator crend() const;
|
| //
|
| // Insert and accessor functions:
|
| -// pair<iterator, bool> insert(const Key&);
|
| -// pair<iterator, bool> insert(Key&&);
|
| +// pair<iterator, bool> insert(const key_type&);
|
| +// pair<iterator, bool> insert(key_type&&);
|
| // void insert(InputIterator first, InputIterator last,
|
| // FlatContainerDupes);
|
| +// template <typename ...Args>
|
| // pair<iterator, bool> emplace(Args&&...);
|
| +// template <typename ...Args>
|
| // iterator emplace_hint(const_iterator, Args&&...);
|
| //
|
| // Erase functions:
|
| +// iterator erase(iterator);
|
| // iterator erase(const_iterator);
|
| // iterator erase(const_iterator first, const_iterator& last);
|
| -// size_t erase(const Key& key)
|
| +// template <typename K>
|
| +// size_t erase(const K& key)
|
| //
|
| // Comparators (see std::set documentation).
|
| // key_compare key_comp() const;
|
| // value_compare value_comp() const;
|
| //
|
| // Search functions:
|
| -// size_t count(const Key&) const;
|
| -// iterator find(const Key&);
|
| -// const_iterator find(const Key&) const;
|
| -// pair<iterator, iterator> equal_range(Key&)
|
| -// iterator lower_bound(const Key&);
|
| -// const_iterator lower_bound(const Key&) const;
|
| -// iterator upper_bound(const Key&);
|
| -// const_iterator upper_bound(const Key&) const;
|
| +// template <typename K>
|
| +// size_t count(const K&) const;
|
| +// template <typename K>
|
| +// iterator find(const K&);
|
| +// template <typename K>
|
| +// const_iterator find(const K&) const;
|
| +// template <typename K>
|
| +// pair<iterator, iterator> equal_range(K&)
|
| +// template <typename K>
|
| +// iterator lower_bound(const K&);
|
| +// template <typename K>
|
| +// const_iterator lower_bound(const K&) const;
|
| +// template <typename K>
|
| +// iterator upper_bound(const K&);
|
| +// template <typename K>
|
| +// const_iterator upper_bound(const K&) const;
|
| //
|
| // General functions:
|
| // void swap(flat_set&&)
|
| @@ -119,7 +132,7 @@ namespace base {
|
| // bool operator>=(const flat_set&, const flat_set);
|
| // bool operator<=(const flat_set&, const flat_set);
|
| //
|
| -template <class Key, class Compare = std::less<Key>>
|
| +template <class Key, class Compare = less>
|
| using flat_set = typename ::base::internal::flat_tree<
|
| Key,
|
| Key,
|
|
|