70 typedef T mapped_type;
80 typedef Compare key_compare;
86 typedef bool result_type;
89 return key_comp_(a.first, b.first);
92 friend class vector_map;
93 value_compare(
const key_compare& key_comp): key_comp_(key_comp) {}
94 key_compare key_comp_;
99 typedef typename std::allocator_traits<Allocator>::template rebind_alloc<value_type> allocator_type;
100 typedef typename std::allocator_traits<Allocator>::pointer
pointer;
101 typedef typename std::allocator_traits<Allocator>::const_pointer const_pointer;
102 typedef typename std::allocator_traits<Allocator>::size_type
size_type;
103 typedef typename std::allocator_traits<Allocator>::difference_type
difference_type;
105 typedef std::vector<value_type, Allocator> vector_type;
106 typedef typename vector_type::iterator iterator;
107 typedef typename vector_type::const_iterator const_iterator;
108 typedef typename vector_type::reverse_iterator reverse_iterator;
109 typedef typename vector_type::const_reverse_iterator const_reverse_iterator;
111 explicit vector_map(
const key_compare& key_comp = key_compare(),
const allocator_type& allocator = Allocator());
112 template <
typename InputIterator>
113 vector_map(InputIterator first, InputIterator last,
114 const key_compare& key_comp = key_compare(),
const allocator_type& allocator = Allocator());
117 vector_map(std::initializer_list<value_type> init,
118 const key_compare& key_comp = key_compare(),
const allocator_type& allocator = Allocator());
124 iterator begin() noexcept;
125 const_iterator begin() const noexcept;
126 const_iterator cbegin() const noexcept;
127 iterator end() noexcept;
128 const_iterator end() const noexcept;
129 const_iterator cend() const noexcept;
130 reverse_iterator rbegin() noexcept;
131 const_reverse_iterator rbegin() const noexcept;
132 const_reverse_iterator crbegin() const noexcept;
133 reverse_iterator rend() noexcept;
134 const_reverse_iterator rend() const noexcept;
135 const_reverse_iterator crend() const noexcept;
137 bool empty() const noexcept;
141 mapped_type& at(const key_type& key);
142 const mapped_type& at(const key_type& key) const;
143 mapped_type& operator[](const key_type& x);
144 mapped_type& operator[](key_type&& x);
146 std::pair<iterator,
bool> insert(const
value_type& x);
147 std::pair<iterator,
bool> insert(
value_type&& value);
148 iterator insert(const_iterator hint, const
value_type& x);
149 template <typename InputIterator>
void insert(InputIterator first, InputIterator last);
151 template<typename M> std::pair<iterator,
bool> insert_or_assign(const key_type& key, M&& obj);
152 template<typename M> std::pair<iterator,
bool> insert_or_assign(key_type&& key, M&& obj);
153 template<typename M> iterator insert_or_assign(const_iterator hint, const key_type& key, M&& obj);
154 template<typename M> iterator insert_or_assign(const_iterator hint, key_type&& key, M&& obj);
156 template<typename... Args> std::pair<iterator,
bool> emplace(Args&&... args);
157 template<typename... Args> iterator emplace_hint(const_iterator hint, Args&&... args);
158 template<typename... Args> std::pair<iterator,
bool> try_emplace(const key_type& key, Args&&... args);
159 template<typename... Args> std::pair<iterator,
bool> try_emplace(key_type&& key, Args&&... args);
160 template<typename... Args> iterator try_emplace(const_iterator hint, const key_type& key, Args&&... args);
161 template<typename... Args> iterator try_emplace(const_iterator hint, key_type&& key, Args&&... args);
163 void erase(const_iterator position);
165 void erase(const_iterator first, const_iterator last);
166 void swap(
vector_map<Key, T, Compare, Allocator>& other) noexcept;
167 void clear() noexcept;
169 key_compare key_comp() const;
170 value_compare value_comp() const;
172 iterator find(const key_type& x);
173 const_iterator find(const key_type& x) const;
174 size_type count(const key_type& x) const;
175 bool contains(const Key& key) const;
177 iterator lower_bound(const key_type& x);
178 const_iterator lower_bound(const key_type& x) const;
179 iterator upper_bound(const key_type& x);
180 const_iterator upper_bound(const key_type& x) const;
182 std::pair<iterator, iterator> equal_range(const key_type& x);
183 std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
187 bool is_insert_position(const_iterator hint, const key_type& x) const;
190 key_compare key_comp_;