24 #ifndef TSL_ORDERED_MAP_H 25 #define TSL_ORDERED_MAP_H 32 #include <initializer_list> 34 #include <type_traits> 72 class Hash = std::hash<Key>,
73 class KeyEqual = std::equal_to<Key>,
74 class Allocator = std::allocator<std::pair<Key, T>>,
75 class ValueTypeContainer = std::deque<std::pair<Key, T>, Allocator>,
76 class IndexType = std::uint_least32_t>
86 const key_type& operator()(
const std::pair<Key, T>& key_value)
const noexcept {
87 return key_value.first;
90 key_type& operator()(std::pair<Key, T>& key_value)
noexcept {
91 return key_value.first;
99 const value_type& operator()(
const std::pair<Key, T>& key_value)
const noexcept {
100 return key_value.second;
103 value_type& operator()(std::pair<Key, T>& key_value)
noexcept {
104 return key_value.second;
109 Hash, KeyEqual, Allocator, ValueTypeContainer, IndexType>;
112 using key_type =
typename ht::key_type;
113 using mapped_type = T;
114 using value_type =
typename ht::value_type;
115 using size_type =
typename ht::size_type;
116 using difference_type =
typename ht::difference_type;
117 using hasher =
typename ht::hasher;
118 using key_equal =
typename ht::key_equal;
119 using allocator_type =
typename ht::allocator_type;
120 using reference =
typename ht::reference;
121 using const_reference =
typename ht::const_reference;
122 using pointer =
typename ht::pointer;
123 using const_pointer =
typename ht::const_pointer;
124 using iterator =
typename ht::iterator;
125 using const_iterator =
typename ht::const_iterator;
126 using reverse_iterator =
typename ht::reverse_iterator;
127 using const_reverse_iterator =
typename ht::const_reverse_iterator;
129 using values_container_type =
typename ht::values_container_type;
139 const Hash& hash = Hash(),
140 const KeyEqual& equal = KeyEqual(),
141 const Allocator& alloc = Allocator()):
142 m_ht(bucket_count, hash, equal, alloc, ht::DEFAULT_MAX_LOAD_FACTOR)
147 const Allocator& alloc):
ordered_map(bucket_count, Hash(), KeyEqual(), alloc)
153 const Allocator& alloc):
ordered_map(bucket_count, hash, KeyEqual(), alloc)
160 template<
class InputIt>
162 size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE,
163 const Hash& hash = Hash(),
164 const KeyEqual& equal = KeyEqual(),
165 const Allocator& alloc = Allocator()):
ordered_map(bucket_count, hash, equal, alloc)
170 template<
class InputIt>
172 size_type bucket_count,
173 const Allocator& alloc):
ordered_map(first, last, bucket_count, Hash(), KeyEqual(), alloc)
177 template<
class InputIt>
179 size_type bucket_count,
181 const Allocator& alloc):
ordered_map(first, last, bucket_count, hash, KeyEqual(), alloc)
186 size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE,
187 const Hash& hash = Hash(),
188 const KeyEqual& equal = KeyEqual(),
189 const Allocator& alloc = Allocator()):
190 ordered_map(init.begin(), init.end(), bucket_count, hash, equal, alloc)
195 size_type bucket_count,
196 const Allocator& alloc):
197 ordered_map(init.begin(), init.end(), bucket_count, Hash(), KeyEqual(), alloc)
202 size_type bucket_count,
204 const Allocator& alloc):
205 ordered_map(init.begin(), init.end(), bucket_count, hash, KeyEqual(), alloc)
213 m_ht.reserve(ilist.size());
214 m_ht.insert(ilist.begin(), ilist.end());
226 iterator
begin()
noexcept {
return m_ht.begin(); }
227 const_iterator
begin()
const noexcept {
return m_ht.begin(); }
228 const_iterator
cbegin()
const noexcept {
return m_ht.cbegin(); }
230 iterator
end()
noexcept {
return m_ht.end(); }
231 const_iterator
end()
const noexcept {
return m_ht.end(); }
232 const_iterator
cend()
const noexcept {
return m_ht.cend(); }
234 reverse_iterator
rbegin()
noexcept {
return m_ht.rbegin(); }
235 const_reverse_iterator
rbegin()
const noexcept {
return m_ht.rbegin(); }
236 const_reverse_iterator
rcbegin()
const noexcept {
return m_ht.rcbegin(); }
238 reverse_iterator
rend()
noexcept {
return m_ht.rend(); }
239 const_reverse_iterator
rend()
const noexcept {
return m_ht.rend(); }
240 const_reverse_iterator
rcend()
const noexcept {
return m_ht.rcend(); }
246 bool empty()
const noexcept {
return m_ht.empty(); }
247 size_type
size()
const noexcept {
return m_ht.size(); }
248 size_type
max_size()
const noexcept {
return m_ht.max_size(); }
253 void clear()
noexcept { m_ht.clear(); }
257 std::pair<iterator,
bool>
insert(
const value_type& value) {
return m_ht.insert(value); }
259 template<
class P,
typename std::enable_if<std::is_constructible<value_type, P&&>::value>::type* =
nullptr>
260 std::pair<iterator,
bool>
insert(P&& value) {
return m_ht.emplace(std::forward<P>(value)); }
262 std::pair<iterator,
bool>
insert(value_type&& value) {
return m_ht.insert(std::move(value)); }
265 iterator
insert(const_iterator hint,
const value_type& value) {
266 return m_ht.insert_hint(hint, value);
269 template<
class P,
typename std::enable_if<std::is_constructible<value_type, P&&>::value>::type* =
nullptr>
270 iterator
insert(const_iterator hint, P&& value) {
271 return m_ht.emplace_hint(hint, std::forward<P>(value));
274 iterator
insert(const_iterator hint, value_type&& value) {
275 return m_ht.insert_hint(hint, std::move(value));
279 template<
class InputIt>
280 void insert(InputIt first, InputIt last) { m_ht.insert(first, last); }
281 void insert(std::initializer_list<value_type> ilist) { m_ht.insert(ilist.begin(), ilist.end()); }
288 return m_ht.insert_or_assign(k, std::forward<M>(obj));
293 return m_ht.insert_or_assign(std::move(k), std::forward<M>(obj));
299 return m_ht.insert_or_assign(hint, k, std::forward<M>(obj));
304 return m_ht.insert_or_assign(hint, std::move(k), std::forward<M>(obj));
313 template<
class... Args>
314 std::pair<iterator,
bool>
emplace(Args&&... args) {
return m_ht.emplace(std::forward<Args>(args)...); }
322 template <
class... Args>
324 return m_ht.emplace_hint(hint, std::forward<Args>(args)...);
330 template<
class... Args>
331 std::pair<iterator,
bool>
try_emplace(
const key_type& k, Args&&... args) {
332 return m_ht.try_emplace(k, std::forward<Args>(args)...);
335 template<
class... Args>
336 std::pair<iterator,
bool>
try_emplace(key_type&& k, Args&&... args) {
337 return m_ht.try_emplace(std::move(k), std::forward<Args>(args)...);
340 template<
class... Args>
341 iterator
try_emplace(const_iterator hint,
const key_type& k, Args&&... args) {
342 return m_ht.try_emplace_hint(hint, k, std::forward<Args>(args)...);
345 template<
class... Args>
346 iterator
try_emplace(const_iterator hint, key_type&& k, Args&&... args) {
347 return m_ht.try_emplace_hint(hint, std::move(k), std::forward<Args>(args)...);
360 iterator
erase(iterator pos) {
return m_ht.erase(pos); }
365 iterator
erase(const_iterator pos) {
return m_ht.erase(pos); }
370 iterator
erase(const_iterator first, const_iterator last) {
return m_ht.erase(first, last); }
375 size_type
erase(
const key_type& key) {
return m_ht.erase(key); }
383 size_type
erase(
const key_type& key, std::size_t precalculated_hash) {
384 return m_ht.erase(key, precalculated_hash);
393 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
394 size_type
erase(
const K& key) {
return m_ht.erase(key); }
402 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
403 size_type
erase(
const K& key, std::size_t precalculated_hash) {
404 return m_ht.erase(key, precalculated_hash);
414 T&
at(
const Key& key) {
return m_ht.at(key); }
420 T&
at(
const Key& key, std::size_t precalculated_hash) {
return m_ht.at(key, precalculated_hash); }
423 const T&
at(
const Key& key)
const {
return m_ht.at(key); }
428 const T&
at(
const Key& key, std::size_t precalculated_hash)
const {
return m_ht.at(key, precalculated_hash); }
435 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
436 T&
at(
const K& key) {
return m_ht.at(key); }
444 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
445 T&
at(
const K& key, std::size_t precalculated_hash) {
return m_ht.at(key, precalculated_hash); }
450 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
451 const T&
at(
const K& key)
const {
return m_ht.at(key); }
456 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
457 const T&
at(
const K& key, std::size_t precalculated_hash)
const {
return m_ht.at(key, precalculated_hash); }
461 T&
operator[](
const Key& key) {
return m_ht[key]; }
462 T&
operator[](Key&& key) {
return m_ht[std::move(key)]; }
466 size_type
count(
const Key& key)
const {
return m_ht.count(key); }
472 size_type
count(
const Key& key, std::size_t precalculated_hash)
const {
473 return m_ht.count(key, precalculated_hash);
480 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
481 size_type
count(
const K& key)
const {
return m_ht.count(key); }
489 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
490 size_type
count(
const K& key, std::size_t precalculated_hash)
const {
491 return m_ht.count(key, precalculated_hash);
496 iterator
find(
const Key& key) {
return m_ht.find(key); }
502 iterator
find(
const Key& key, std::size_t precalculated_hash) {
return m_ht.find(key, precalculated_hash); }
504 const_iterator
find(
const Key& key)
const {
return m_ht.find(key); }
509 const_iterator
find(
const Key& key, std::size_t precalculated_hash)
const {
510 return m_ht.find(key, precalculated_hash);
517 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
518 iterator
find(
const K& key) {
return m_ht.find(key); }
526 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
527 iterator
find(
const K& key, std::size_t precalculated_hash) {
return m_ht.find(key, precalculated_hash); }
532 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
533 const_iterator
find(
const K& key)
const {
return m_ht.find(key); }
541 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
542 const_iterator
find(
const K& key, std::size_t precalculated_hash)
const {
543 return m_ht.find(key, precalculated_hash);
548 std::pair<iterator, iterator>
equal_range(
const Key& key) {
return m_ht.equal_range(key); }
554 std::pair<iterator, iterator>
equal_range(
const Key& key, std::size_t precalculated_hash) {
555 return m_ht.equal_range(key, precalculated_hash);
558 std::pair<const_iterator, const_iterator>
equal_range(
const Key& key)
const {
return m_ht.equal_range(key); }
563 std::pair<const_iterator, const_iterator>
equal_range(
const Key& key, std::size_t precalculated_hash)
const {
564 return m_ht.equal_range(key, precalculated_hash);
571 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
572 std::pair<iterator, iterator>
equal_range(
const K& key) {
return m_ht.equal_range(key); }
580 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
581 std::pair<iterator, iterator>
equal_range(
const K& key, std::size_t precalculated_hash) {
582 return m_ht.equal_range(key, precalculated_hash);
588 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
589 std::pair<const_iterator, const_iterator>
equal_range(
const K& key)
const {
return m_ht.equal_range(key); }
594 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
595 std::pair<const_iterator, const_iterator>
equal_range(
const K& key, std::size_t precalculated_hash)
const {
596 return m_ht.equal_range(key, precalculated_hash);
615 void rehash(size_type count) { m_ht.rehash(count); }
616 void reserve(size_type count) { m_ht.reserve(count); }
623 key_equal
key_eq()
const {
return m_ht.key_eq(); }
635 return m_ht.mutable_iterator(pos);
643 iterator
nth(size_type index) {
return m_ht.nth(index); }
648 const_iterator
nth(size_type index)
const {
return m_ht.nth(index); }
654 const_reference
front()
const {
return m_ht.front(); }
659 const_reference
back()
const {
return m_ht.back(); }
665 template<
class U = values_container_type,
typename std::enable_if<
tsl::
detail_ordered_hash::is_vector<U>::value>::type* =
nullptr>
666 const typename values_container_type::
value_type*
data()
const noexcept {
return m_ht.data(); }
672 const values_container_type&
values_container()
const noexcept {
return m_ht.values_container(); }
674 template<
class U = values_container_type,
typename std::enable_if<
tsl::
detail_ordered_hash::is_vector<U>::value>::type* =
nullptr>
675 size_type
capacity()
const noexcept {
return m_ht.capacity(); }
688 return m_ht.insert_at_position(pos, value);
695 return m_ht.insert_at_position(pos, std::move(value));
704 template<
class... Args>
706 return m_ht.emplace_at_position(pos, std::forward<Args>(args)...);
712 template<
class... Args>
714 return m_ht.try_emplace_at_position(pos, k, std::forward<Args>(args)...);
720 template<
class... Args>
722 return m_ht.try_emplace_at_position(pos, std::move(k), std::forward<Args>(args)...);
753 return m_ht.unordered_erase(key, precalculated_hash);
762 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
771 template<
class K,
class KE = KeyEqual,
typename std::enable_if<has_is_transparent<KE>::value>::type* =
nullptr>
773 return m_ht.unordered_erase(key, precalculated_hash);
785 template<
class Serializer>
787 m_ht.serialize(serializer);
808 template<
class Deserializer>
811 map.m_ht.deserialize(deserializer, hash_compatible);
std::pair< const_iterator, const_iterator > equal_range(const Key &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:563
size_type unordered_erase(const key_type &key, std::size_t precalculated_hash)
Definition: ordered_map.h:752
iterator find(const Key &key, std::size_t precalculated_hash)
Definition: ordered_map.h:502
size_type unordered_erase(const K &key, std::size_t precalculated_hash)
Definition: ordered_map.h:772
const_iterator nth(size_type index) const
Definition: ordered_map.h:648
size_type unordered_erase(const K &key)
Definition: ordered_map.h:763
ordered_map(InputIt first, InputIt last, size_type bucket_count, const Allocator &alloc)
Definition: ordered_map.h:171
void reserve(size_type count)
Definition: ordered_map.h:616
friend bool operator>(const ordered_map &lhs, const ordered_map &rhs)
Definition: ordered_map.h:822
const_reverse_iterator rend() const noexcept
Definition: ordered_map.h:239
Definition: ordered_hash.h:279
iterator insert(const_iterator hint, P &&value)
Definition: ordered_map.h:270
const_reverse_iterator rcbegin() const noexcept
Definition: ordered_map.h:236
ordered_map & operator=(std::initializer_list< value_type > ilist)
Definition: ordered_map.h:210
T & at(const K &key, std::size_t precalculated_hash)
Definition: ordered_map.h:445
size_type count(const Key &key) const
Definition: ordered_map.h:466
const T & at(const K &key) const
Definition: ordered_map.h:451
T & operator[](const Key &key)
Definition: ordered_map.h:461
void rehash(size_type count)
Definition: ordered_map.h:615
const_iterator find(const Key &key) const
Definition: ordered_map.h:504
friend bool operator==(const ordered_map &lhs, const ordered_map &rhs)
Definition: ordered_map.h:818
Definition: ordered_hash.h:82
Definition: ordered_hash.h:80
iterator end() noexcept
Definition: ordered_map.h:230
iterator erase(iterator pos)
Definition: ordered_map.h:360
iterator insert(const_iterator hint, value_type &&value)
Definition: ordered_map.h:274
size_type count(const Key &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:472
std::pair< iterator, iterator > equal_range(const K &key, std::size_t precalculated_hash)
Definition: ordered_map.h:581
iterator begin() noexcept
Definition: ordered_map.h:226
ordered_map(std::initializer_list< value_type > init, size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: ordered_map.h:201
size_type max_size() const noexcept
Definition: ordered_map.h:248
const values_container_type::value_type * data() const noexcept
Definition: ordered_map.h:666
void shrink_to_fit()
Definition: ordered_map.h:677
const values_container_type & values_container() const noexcept
Definition: ordered_map.h:672
size_type unordered_erase(const key_type &key)
Definition: ordered_map.h:744
size_type size() const noexcept
Definition: ordered_map.h:247
const_iterator end() const noexcept
Definition: ordered_map.h:231
iterator insert_or_assign(const_iterator hint, key_type &&k, M &&obj)
Definition: ordered_map.h:303
iterator erase(const_iterator pos)
Definition: ordered_map.h:365
ordered_map(std::initializer_list< value_type > init, size_type bucket_count=ht::DEFAULT_INIT_BUCKETS_SIZE, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: ordered_map.h:185
reverse_iterator rend() noexcept
Definition: ordered_map.h:238
std::pair< iterator, iterator > equal_range(const Key &key)
Definition: ordered_map.h:548
const_reference front() const
Definition: ordered_map.h:654
std::pair< iterator, bool > insert(value_type &&value)
Definition: ordered_map.h:262
iterator find(const Key &key)
Definition: ordered_map.h:496
iterator unordered_erase(const_iterator pos)
Definition: ordered_map.h:739
iterator try_emplace(const_iterator hint, key_type &&k, Args &&... args)
Definition: ordered_map.h:346
const T & at(const K &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:457
std::pair< iterator, iterator > equal_range(const K &key)
Definition: ordered_map.h:572
std::pair< iterator, bool > emplace_at_position(const_iterator pos, Args &&... args)
Definition: ordered_map.h:705
std::pair< iterator, bool > try_emplace(key_type &&k, Args &&... args)
Definition: ordered_map.h:336
const_reference back() const
Definition: ordered_map.h:659
size_type erase(const K &key, std::size_t precalculated_hash)
Definition: ordered_map.h:403
const_iterator find(const K &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:542
friend bool operator>=(const ordered_map &lhs, const ordered_map &rhs)
Definition: ordered_map.h:823
ordered_map(size_type bucket_count, const Allocator &alloc)
Definition: ordered_map.h:146
void max_load_factor(float ml)
Definition: ordered_map.h:613
iterator mutable_iterator(const_iterator pos)
Definition: ordered_map.h:634
T & at(const K &key)
Definition: ordered_map.h:436
iterator find(const K &key, std::size_t precalculated_hash)
Definition: ordered_map.h:527
key_equal key_eq() const
Definition: ordered_map.h:623
size_type erase(const key_type &key)
Definition: ordered_map.h:375
ordered_map(size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: ordered_map.h:151
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition: ordered_map.h:323
reverse_iterator rbegin() noexcept
Definition: ordered_map.h:234
const T & at(const Key &key) const
Definition: ordered_map.h:423
bool empty() const noexcept
Definition: ordered_map.h:246
size_type erase(const key_type &key, std::size_t precalculated_hash)
Definition: ordered_map.h:383
friend bool operator<=(const ordered_map &lhs, const ordered_map &rhs)
Definition: ordered_map.h:821
void pop_back()
Definition: ordered_map.h:727
const_reverse_iterator rcend() const noexcept
Definition: ordered_map.h:240
iterator insert_or_assign(const_iterator hint, const key_type &k, M &&obj)
Definition: ordered_map.h:298
iterator find(const K &key)
Definition: ordered_map.h:518
const_iterator find(const K &key) const
Definition: ordered_map.h:533
std::pair< iterator, bool > insert_at_position(const_iterator pos, value_type &&value)
Definition: ordered_map.h:694
std::pair< iterator, bool > insert(P &&value)
Definition: ordered_map.h:260
size_type count(const K &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:490
allocator_type get_allocator() const
Definition: ordered_map.h:219
void serialize(Serializer &serializer) const
Definition: ordered_map.h:786
ordered_map(InputIt first, InputIt last, size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: ordered_map.h:178
ordered_map(size_type bucket_count, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: ordered_map.h:138
std::pair< iterator, bool > insert_or_assign(key_type &&k, M &&obj)
Definition: ordered_map.h:292
size_type count(const K &key) const
Definition: ordered_map.h:481
void clear() noexcept
Definition: ordered_map.h:253
void insert(std::initializer_list< value_type > ilist)
Definition: ordered_map.h:281
std::pair< iterator, bool > try_emplace_at_position(const_iterator pos, key_type &&k, Args &&... args)
Definition: ordered_map.h:721
static ordered_map deserialize(Deserializer &deserializer, bool hash_compatible=false)
Definition: ordered_map.h:809
std::pair< const_iterator, const_iterator > equal_range(const K &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:595
std::pair< iterator, bool > insert_at_position(const_iterator pos, const value_type &value)
Definition: ordered_map.h:687
iterator try_emplace(const_iterator hint, const key_type &k, Args &&... args)
Definition: ordered_map.h:341
T & at(const Key &key)
Definition: ordered_map.h:414
T & operator[](Key &&key)
Definition: ordered_map.h:462
std::pair< const_iterator, const_iterator > equal_range(const K &key) const
Definition: ordered_map.h:589
std::pair< iterator, bool > insert(const value_type &value)
Definition: ordered_map.h:257
friend void swap(ordered_map &lhs, ordered_map &rhs)
Definition: ordered_map.h:825
const_iterator find(const Key &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:509
std::pair< iterator, bool > insert_or_assign(const key_type &k, M &&obj)
Definition: ordered_map.h:287
friend bool operator<(const ordered_map &lhs, const ordered_map &rhs)
Definition: ordered_map.h:820
Definition: ordered_map.h:77
std::pair< iterator, bool > emplace(Args &&... args)
Definition: ordered_map.h:314
friend bool operator!=(const ordered_map &lhs, const ordered_map &rhs)
Definition: ordered_map.h:819
void swap(ordered_map &other)
Definition: ordered_map.h:409
size_type bucket_count() const
Definition: ordered_map.h:604
std::pair< const_iterator, const_iterator > equal_range(const Key &key) const
Definition: ordered_map.h:558
std::pair< iterator, iterator > equal_range(const Key &key, std::size_t precalculated_hash)
Definition: ordered_map.h:554
ordered_map(const Allocator &alloc)
Definition: ordered_map.h:157
std::pair< iterator, bool > try_emplace_at_position(const_iterator pos, const key_type &k, Args &&... args)
Definition: ordered_map.h:713
const_iterator cbegin() const noexcept
Definition: ordered_map.h:228
iterator unordered_erase(iterator pos)
Definition: ordered_map.h:734
iterator nth(size_type index)
Definition: ordered_map.h:643
size_type erase(const K &key)
Definition: ordered_map.h:394
const_reverse_iterator rbegin() const noexcept
Definition: ordered_map.h:235
iterator insert(const_iterator hint, const value_type &value)
Definition: ordered_map.h:265
size_type max_bucket_count() const
Definition: ordered_map.h:605
T & at(const Key &key, std::size_t precalculated_hash)
Definition: ordered_map.h:420
const T & at(const Key &key, std::size_t precalculated_hash) const
Definition: ordered_map.h:428
ordered_map()
Definition: ordered_map.h:135
iterator erase(const_iterator first, const_iterator last)
Definition: ordered_map.h:370
ordered_map(std::initializer_list< value_type > init, size_type bucket_count, const Allocator &alloc)
Definition: ordered_map.h:194
size_type capacity() const noexcept
Definition: ordered_map.h:675
const_iterator begin() const noexcept
Definition: ordered_map.h:227
hasher hash_function() const
Definition: ordered_map.h:622
const_iterator cend() const noexcept
Definition: ordered_map.h:232
void insert(InputIt first, InputIt last)
Definition: ordered_map.h:280
ordered_map(InputIt first, InputIt last, size_type bucket_count=ht::DEFAULT_INIT_BUCKETS_SIZE, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: ordered_map.h:161
float max_load_factor() const
Definition: ordered_map.h:612
float load_factor() const
Definition: ordered_map.h:611
std::pair< iterator, bool > try_emplace(const key_type &k, Args &&... args)
Definition: ordered_map.h:331