momo  3.12
unordered_multimap.h
Go to the documentation of this file.
1 /**********************************************************\
2 
3  This file is part of the
4  https://github.com/morzhovets/momo
5  project, distributed under the MIT License. See
6  https://github.com/morzhovets/momo/blob/branch_cpp11/LICENSE
7  for details.
8 
9  momo/stdish/unordered_multimap.h
10 
11  namespace momo::stdish:
12  class unordered_multimap_adaptor
13  class unordered_multimap
14  class unordered_multimap_open
15 
16 \**********************************************************/
17 
18 #ifndef MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
19 #define MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
20 
21 #include "set_map_utility.h"
22 #include MOMO_PARENT_HEADER(HashMultiMap)
23 
24 namespace momo
25 {
26 
27 namespace stdish
28 {
29 
30 template<typename THashMultiMap>
32 {
33 private:
34  typedef THashMultiMap HashMultiMap;
35  typedef typename HashMultiMap::HashTraits HashTraits;
36  typedef typename HashMultiMap::MemManager MemManager;
37 
38 public:
39  typedef typename HashMultiMap::Key key_type;
40  typedef typename HashMultiMap::Value mapped_type;
41  typedef typename HashTraits::Hasher hasher;
42  typedef typename HashTraits::EqualComparer key_equal;
43 
44  typedef HashMultiMap nested_container_type;
45 
46  typedef size_t size_type;
47  typedef ptrdiff_t difference_type;
48 
49  typedef std::pair<const key_type, mapped_type> value_type;
50  typedef typename std::allocator_traits<typename MemManager::ByteAllocator>
51  ::template rebind_alloc<value_type> allocator_type;
52 
56 
57  typedef typename iterator::Reference reference;
59 
60  typedef typename iterator::Pointer pointer;
62  //typedef typename std::allocator_traits<allocator_type>::pointer pointer;
63  //typedef typename std::allocator_traits<allocator_type>::const_pointer const_pointer;
64 
65  //node_type;
66 
67  //local_iterator;
68  //const_local_iterator;
69 
70 private:
71  template<typename KeyArg>
72  struct IsValidKeyArg : public HashTraits::template IsValidKeyArg<KeyArg>
73  {
74  };
75 
76  struct ConstIteratorProxy : private const_iterator
77  {
78  typedef const_iterator ConstIterator;
79  MOMO_DECLARE_PROXY_FUNCTION(ConstIterator, GetBaseIterator)
80  };
81 
82 public:
84  {
85  }
86 
88  : mHashMultiMap(HashTraits(), MemManager(alloc))
89  {
90  }
91 
92  explicit unordered_multimap_adaptor(size_type bucketCount,
93  const allocator_type& alloc = allocator_type())
94  : mHashMultiMap(HashTraits(bucketCount), MemManager(alloc))
95  {
96  }
97 
98  unordered_multimap_adaptor(size_type bucketCount, const hasher& hashFunc,
99  const allocator_type& alloc = allocator_type())
100  : mHashMultiMap(HashTraits(bucketCount, hashFunc), MemManager(alloc))
101  {
102  }
103 
104  unordered_multimap_adaptor(size_type bucketCount, const hasher& hashFunc,
105  const key_equal& equalComp, const allocator_type& alloc = allocator_type())
106  : mHashMultiMap(HashTraits(bucketCount, hashFunc, equalComp), MemManager(alloc))
107  {
108  }
109 
110  template<typename Iterator>
111  unordered_multimap_adaptor(Iterator first, Iterator last)
112  {
113  insert(first, last);
114  }
115 
116  template<typename Iterator>
117  unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount,
118  const allocator_type& alloc = allocator_type())
119  : unordered_multimap_adaptor(bucketCount, alloc)
120  {
121  insert(first, last);
122  }
123 
124  template<typename Iterator>
125  unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount,
126  const hasher& hashFunc, const allocator_type& alloc = allocator_type())
127  : unordered_multimap_adaptor(bucketCount, hashFunc, alloc)
128  {
129  insert(first, last);
130  }
131 
132  template<typename Iterator>
133  unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount,
134  const hasher& hashFunc, const key_equal& equalComp, const allocator_type& alloc = allocator_type())
135  : unordered_multimap_adaptor(bucketCount, hashFunc, equalComp, alloc)
136  {
137  insert(first, last);
138  }
139 
140  unordered_multimap_adaptor(std::initializer_list<value_type> values)
141  : unordered_multimap_adaptor(values.begin(), values.end())
142  {
143  }
144 
145  unordered_multimap_adaptor(std::initializer_list<value_type> values, size_type bucketCount,
146  const allocator_type& alloc = allocator_type())
147  : unordered_multimap_adaptor(values.begin(), values.end(), bucketCount, alloc)
148  {
149  }
150 
151  unordered_multimap_adaptor(std::initializer_list<value_type> values, size_type bucketCount,
152  const hasher& hashFunc, const allocator_type& alloc = allocator_type())
153  : unordered_multimap_adaptor(values.begin(), values.end(), bucketCount, hashFunc, alloc)
154  {
155  }
156 
157  unordered_multimap_adaptor(std::initializer_list<value_type> values, size_type bucketCount,
158  const hasher& hashFunc, const key_equal& equalComp, const allocator_type& alloc = allocator_type())
159  : unordered_multimap_adaptor(values.begin(), values.end(), bucketCount, hashFunc, equalComp, alloc)
160  {
161  }
162 
163 #ifdef MOMO_HAS_CONTAINERS_RANGES
164  template<std::ranges::input_range Range>
165  requires std::convertible_to<std::ranges::range_reference_t<Range>, value_type>
166  unordered_multimap_adaptor(std::from_range_t, Range&& values)
167  {
168  insert_range(std::forward<Range>(values));
169  }
170 
171  template<std::ranges::input_range Range>
172  requires std::convertible_to<std::ranges::range_reference_t<Range>, value_type>
173  unordered_multimap_adaptor(std::from_range_t, Range&& values, size_type bucketCount,
174  const allocator_type& alloc = allocator_type())
175  : unordered_multimap_adaptor(bucketCount, alloc)
176  {
177  insert_range(std::forward<Range>(values));
178  }
179 
180  template<std::ranges::input_range Range>
181  requires std::convertible_to<std::ranges::range_reference_t<Range>, value_type>
182  unordered_multimap_adaptor(std::from_range_t, Range&& values, size_type bucketCount,
183  const hasher& hashFunc, const allocator_type& alloc = allocator_type())
184  : unordered_multimap_adaptor(bucketCount, hashFunc, alloc)
185  {
186  insert_range(std::forward<Range>(values));
187  }
188 
189  template<std::ranges::input_range Range>
190  requires std::convertible_to<std::ranges::range_reference_t<Range>, value_type>
191  unordered_multimap_adaptor(std::from_range_t, Range&& values, size_type bucketCount,
192  const hasher& hashFunc, const key_equal& equalComp,
193  const allocator_type& alloc = allocator_type())
194  : unordered_multimap_adaptor(bucketCount, hashFunc, equalComp, alloc)
195  {
196  insert_range(std::forward<Range>(values));
197  }
198 #endif // MOMO_HAS_CONTAINERS_RANGES
199 
201  : unordered_multimap_adaptor(std::move(right), right.get_allocator())
202  {
203  }
204 
206  : mHashMultiMap(right.mHashMultiMap.GetHashTraits(), MemManager(alloc))
207  {
208  if (right.get_allocator() == alloc)
209  {
210  mHashMultiMap.Swap(right.mHashMultiMap);
211  }
212  else
213  {
214  for (reference ref : right)
215  mHashMultiMap.Add(ref.first, std::move(ref.second));
216  right.clear();
217  }
218  }
219 
221  : mHashMultiMap(right.mHashMultiMap)
222  {
223  }
224 
226  : mHashMultiMap(right.mHashMultiMap, MemManager(alloc))
227  {
228  }
229 
231 
234  {
235  return momo::internal::ContainerAssignerStd::Move(std::move(right), *this);
236  }
237 
239  {
240  return momo::internal::ContainerAssignerStd::Copy(right, *this);
241  }
242 
243  unordered_multimap_adaptor& operator=(std::initializer_list<value_type> values)
244  {
245  mHashMultiMap = HashMultiMap(values, mHashMultiMap.GetHashTraits(), MemManager(get_allocator()));
246  return *this;
247  }
248 
249  void swap(unordered_multimap_adaptor& right) noexcept
250  {
252  }
253 
254  friend void swap(unordered_multimap_adaptor& left, unordered_multimap_adaptor& right) noexcept
255  {
256  left.swap(right);
257  }
258 
260  {
261  return mHashMultiMap;
262  }
263 
265  {
266  return mHashMultiMap;
267  }
268 
269  const_iterator begin() const noexcept
270  {
271  return momo::internal::ProxyConstructor<const_iterator>(mHashMultiMap.GetBegin());
272  }
273 
274  iterator begin() noexcept
275  {
276  return momo::internal::ProxyConstructor<iterator>(mHashMultiMap.GetBegin());
277  }
278 
279  const_iterator end() const noexcept
280  {
281  return momo::internal::ProxyConstructor<const_iterator>(mHashMultiMap.GetEnd());
282  }
283 
284  iterator end() noexcept
285  {
286  return momo::internal::ProxyConstructor<iterator>(mHashMultiMap.GetEnd());
287  }
288 
289  const_iterator cbegin() const noexcept
290  {
291  return begin();
292  }
293 
294  const_iterator cend() const noexcept
295  {
296  return end();
297  }
298 
299  //float max_load_factor() const noexcept
300  //void max_load_factor(float maxLoadFactor)
301 
303  {
304  return mHashMultiMap.GetHashTraits().GetHasher();
305  }
306 
308  {
309  return mHashMultiMap.GetHashTraits().GetEqualComparer();
310  }
311 
312  allocator_type get_allocator() const noexcept
313  {
314  return allocator_type(mHashMultiMap.GetMemManager().GetByteAllocator());
315  }
316 
317  size_type max_size() const noexcept
318  {
319  return std::allocator_traits<allocator_type>::max_size(get_allocator());
320  }
321 
322  size_type size() const noexcept
323  {
324  return mHashMultiMap.GetCount();
325  }
326 
327  MOMO_NODISCARD bool empty() const noexcept
328  {
329  return mHashMultiMap.IsEmpty();
330  }
331 
332  void clear() noexcept
333  {
334  mHashMultiMap.Clear();
335  }
336 
337  //void rehash(size_type bucketCount)
338  //void reserve(size_type count)
339 
341  {
342  return equal_range(key).first;
343  }
344 
346  {
347  return equal_range(key).first;
348  }
349 
350  template<typename KeyArg>
352  const_iterator> find(const KeyArg& key) const
353  {
354  return equal_range(key).first;
355  }
356 
357  template<typename KeyArg>
359  iterator> find(const KeyArg& key)
360  {
361  return equal_range(key).first;
362  }
363 
365  {
366  typename HashMultiMap::ConstKeyIterator keyIter = mHashMultiMap.Find(key);
367  return !!keyIter ? keyIter->GetCount() : 0;
368  }
369 
370  template<typename KeyArg>
372  size_type> count(const KeyArg& key) const
373  {
374  typename HashMultiMap::ConstKeyIterator keyIter = mHashMultiMap.Find(key);
375  return !!keyIter ? keyIter->GetCount() : 0;
376  }
377 
378  MOMO_FORCEINLINE bool contains(const key_type& key) const
379  {
380  return count(key) > 0;
381  }
382 
383  template<typename KeyArg>
385  bool> contains(const KeyArg& key) const
386  {
387  return count(key) > 0;
388  }
389 
390  MOMO_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& key) const
391  {
392  return pvEqualRange<const_iterator>(mHashMultiMap, mHashMultiMap.Find(key));
393  }
394 
395  MOMO_FORCEINLINE std::pair<iterator, iterator> equal_range(const key_type& key)
396  {
397  return pvEqualRange<iterator>(mHashMultiMap, mHashMultiMap.Find(key));
398  }
399 
400  template<typename KeyArg>
402  std::pair<const_iterator, const_iterator>> equal_range(const KeyArg& key) const
403  {
404  return pvEqualRange<const_iterator>(mHashMultiMap, mHashMultiMap.Find(key));
405  }
406 
407  template<typename KeyArg>
409  std::pair<iterator, iterator>> equal_range(const KeyArg& key)
410  {
411  return pvEqualRange<iterator>(mHashMultiMap, mHashMultiMap.Find(key));
412  }
413 
414  template<typename ValueArg = std::pair<key_type, mapped_type>>
416  iterator> insert(ValueArg&& valueArg)
417  {
418  return emplace(std::forward<ValueArg>(valueArg));
419  }
420 
421  template<typename ValueArg = std::pair<key_type, mapped_type>>
423  iterator> insert(const_iterator, ValueArg&& valueArg)
424  {
425  return insert(std::forward<ValueArg>(valueArg));
426  }
427 
428  template<typename Iterator>
429  void insert(Iterator first, Iterator last)
430  {
431  pvInsertRange(first, last);
432  }
433 
434  void insert(std::initializer_list<value_type> values)
435  {
436  mHashMultiMap.Add(values.begin(), values.end());
437  }
438 
439 #ifdef MOMO_HAS_CONTAINERS_RANGES
440  template<std::ranges::input_range Range>
441  requires std::convertible_to<std::ranges::range_reference_t<Range>, value_type>
442  void insert_range(Range&& values)
443  {
444  pvInsertRange(std::ranges::begin(values), std::ranges::end(values));
445  }
446 #endif // MOMO_HAS_CONTAINERS_RANGES
447 
449  {
450  return pvEmplace(std::tuple<>(), std::tuple<>());
451  }
452 
454  {
455  return emplace();
456  }
457 
458  template<typename ValueArg>
459  iterator emplace(ValueArg&& valueArg)
460  {
461  return pvEmplace(std::forward_as_tuple(std::get<0>(std::forward<ValueArg>(valueArg))),
462  std::forward_as_tuple(std::get<1>(std::forward<ValueArg>(valueArg))));
463  }
464 
465  template<typename ValueArg>
466  iterator emplace_hint(const_iterator, ValueArg&& valueArg)
467  {
468  return emplace(std::forward<ValueArg>(valueArg));
469  }
470 
471  template<typename KeyArg, typename MappedArg>
472  iterator emplace(KeyArg&& keyArg, MappedArg&& mappedArg)
473  {
474  return pvEmplace(std::forward_as_tuple(std::forward<KeyArg>(keyArg)),
475  std::forward_as_tuple(std::forward<MappedArg>(mappedArg)));
476  }
477 
478  template<typename KeyArg, typename MappedArg>
479  iterator emplace_hint(const_iterator, KeyArg&& keyArg, MappedArg&& mappedArg)
480  {
481  return emplace(std::forward<KeyArg>(keyArg), std::forward<MappedArg>(mappedArg));
482  }
483 
484  template<typename... KeyArgs, typename... MappedArgs>
485  iterator emplace(std::piecewise_construct_t,
486  std::tuple<KeyArgs...> keyArgs, std::tuple<MappedArgs...> mappedArgs)
487  {
488  return pvEmplace(std::move(keyArgs), std::move(mappedArgs));
489  }
490 
491  template<typename... KeyArgs, typename... MappedArgs>
492  iterator emplace_hint(const_iterator, std::piecewise_construct_t,
493  std::tuple<KeyArgs...> keyArgs, std::tuple<MappedArgs...> mappedArgs)
494  {
495  return pvEmplace(std::move(keyArgs), std::move(mappedArgs));
496  }
497 
499  {
500  typename HashMultiMap::ConstIterator iter = ConstIteratorProxy::GetBaseIterator(where);
501  typename HashMultiMap::ConstKeyIterator keyIter = iter.GetKeyIterator();
502  return momo::internal::ProxyConstructor<iterator>((keyIter->GetCount() > 1)
503  ? mHashMultiMap.Remove(iter)
504  : mHashMultiMap.MakeIterator(mHashMultiMap.RemoveKey(keyIter)));
505  }
506 
508  {
509  return erase(static_cast<const_iterator>(where));
510  }
511 
513  {
514  if (first == begin() && last == end())
515  {
516  clear();
517  return end();
518  }
519  if (first == last)
520  {
521  return momo::internal::ProxyConstructor<iterator>(mHashMultiMap.MakeMutableIterator(
522  ConstIteratorProxy::GetBaseIterator(first)));
523  }
524  if (first != end())
525  {
526  if (std::next(first) == last)
527  return erase(first);
528  typename HashMultiMap::ConstKeyIterator keyIter =
529  ConstIteratorProxy::GetBaseIterator(first).GetKeyIterator();
531  mHashMultiMap.MakeIterator(keyIter, keyIter->GetCount())))
532  {
534  mHashMultiMap.MakeIterator(mHashMultiMap.RemoveKey(keyIter)));
535  }
536  }
537  MOMO_THROW(std::invalid_argument("invalid unordered_multimap erase arguments"));
538  }
539 
541  {
542  return mHashMultiMap.RemoveKey(key);
543  }
544 
545  template<typename ValueFilter>
546  friend size_type erase_if(unordered_multimap_adaptor& cont, const ValueFilter& valueFilter)
547  {
548  auto pairFilter = [&valueFilter] (const key_type& key, const mapped_type& mapped)
549  { return valueFilter(const_reference(key, mapped)); };
550  return cont.mHashMultiMap.Remove(pairFilter);
551  }
552 
553  //iterator insert(node_type&& node)
554  //iterator insert(const_iterator, node_type&& node)
555  //node_type extract(const_iterator where)
556  //node_type extract(const key_type& key)
557  //void merge(...)
558 
559  //size_type max_bucket_count() const noexcept
560  //size_type bucket_count() const noexcept
561  //size_type bucket_size(size_type bucketIndex) const
562  //local_iterator begin(size_type bucketIndex)
563  //const_local_iterator begin(size_type bucketIndex) const
564  //local_iterator end(size_type bucketIndex)
565  //const_local_iterator end(size_type bucketIndex) const
566  //const_local_iterator cbegin(size_type bucketIndex) const
567  //const_local_iterator cend(size_type bucketIndex) const
568  //size_type bucket(const key_type& key) const
569  //float load_factor() const noexcept
570 
571  friend bool operator==(const unordered_multimap_adaptor& left,
572  const unordered_multimap_adaptor& right)
573  {
574  if (left.mHashMultiMap.GetKeyCount() != right.mHashMultiMap.GetKeyCount())
575  return false;
576  if (left.mHashMultiMap.GetCount() != right.mHashMultiMap.GetCount())
577  return false;
578  typedef typename HashMultiMap::ConstKeyIterator ConstKeyIterator;
579  for (typename ConstKeyIterator::Reference ref : left.mHashMultiMap.GetKeyBounds())
580  {
581  if (ref.GetCount() == 0)
582  continue;
583  ConstKeyIterator rightKeyIter = right.mHashMultiMap.Find(ref.key);
584  if (!rightKeyIter)
585  return false;
586  if (ref.GetCount() != rightKeyIter->GetCount())
587  return false;
588  if (!std::is_permutation(ref.GetBegin(), ref.GetEnd(), rightKeyIter->GetBegin()))
589  return false;
590  }
591  return true;
592  }
593 
594  friend bool operator!=(const unordered_multimap_adaptor& left,
595  const unordered_multimap_adaptor& right)
596  {
597  return !(left == right);
598  }
599 
600 private:
601  template<typename Iterator, typename HashMultiMap, typename KeyIterator>
602  static std::pair<Iterator, Iterator> pvEqualRange(HashMultiMap& hashMultiMap,
603  KeyIterator keyIter)
604  {
605  Iterator end = momo::internal::ProxyConstructor<Iterator>(hashMultiMap.GetEnd());
606  if (!keyIter)
607  return { end, end };
608  size_t count = keyIter->GetCount();
609  if (count == 0)
610  return { end, end };
612  hashMultiMap.MakeIterator(keyIter, 0));
614  hashMultiMap.MakeIterator(keyIter, count));
615  return { first, last };
616  }
617 
618  template<typename... KeyArgs, typename... MappedArgs>
619  iterator pvEmplace(std::tuple<KeyArgs...>&& keyArgs, std::tuple<MappedArgs...>&& mappedArgs)
620  {
621  typedef typename HashMultiMap::KeyValueTraits
622  ::template ValueCreator<MappedArgs...> MappedCreator;
623  return pvInsert(std::move(keyArgs),
624  MappedCreator(mHashMultiMap.GetMemManager(), std::move(mappedArgs)));
625  }
626 
627  template<typename... KeyArgs, typename MappedCreator>
628  iterator pvInsert(std::tuple<KeyArgs...>&& keyArgs, MappedCreator&& mappedCreator)
629  {
630  MemManager& memManager = mHashMultiMap.GetMemManager();
633  typedef typename KeyManager::template Creator<KeyArgs...> KeyCreator;
634  KeyBuffer keyBuffer;
635  KeyCreator(memManager, std::move(keyArgs))(keyBuffer.GetPtr());
636  typename KeyManager::DestroyFinalizer keyFin(&memManager, keyBuffer.Get());
637  return pvInsert(std::forward_as_tuple(std::move(keyBuffer.Get())),
638  std::forward<MappedCreator>(mappedCreator));
639  }
640 
641  template<typename RKey, typename MappedCreator,
642  typename Key = typename std::decay<RKey>::type>
644  iterator> pvInsert(std::tuple<RKey>&& key, MappedCreator&& mappedCreator)
645  {
646  return momo::internal::ProxyConstructor<iterator>(mHashMultiMap.AddCrt(
647  std::forward<RKey>(std::get<0>(key)), std::forward<MappedCreator>(mappedCreator)));
648  }
649 
650  template<typename Iterator, typename Sentinel>
652  void> pvInsertRange(Iterator begin, Sentinel end)
653  {
654  mHashMultiMap.Add(std::move(begin), std::move(end));
655  }
656 
657  template<typename Iterator, typename Sentinel>
659  void> pvInsertRange(Iterator begin, Sentinel end)
660  {
661  for (Iterator iter = std::move(begin); iter != end; ++iter)
662  insert(*iter);
663  }
664 
665 private:
666  HashMultiMap mHashMultiMap;
667 };
668 
698 template<typename TKey, typename TMapped,
699  typename THasher = HashCoder<TKey>,
700  typename TEqualComparer = std::equal_to<TKey>,
701  typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>>
702 class unordered_multimap : public unordered_multimap_adaptor<HashMultiMap<TKey, TMapped,
703  HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketDefault>, MemManagerStd<TAllocator>>>
704 {
705 private:
706  typedef unordered_multimap_adaptor<momo::HashMultiMap<TKey, TMapped,
709 
710 public:
711  using UnorderedMultiMapAdaptor::UnorderedMultiMapAdaptor;
712 
714  std::initializer_list<typename UnorderedMultiMapAdaptor::value_type> values)
715  {
717  return *this;
718  }
719 
720  friend void swap(unordered_multimap& left, unordered_multimap& right) noexcept
721  {
722  left.swap(right);
723  }
724 };
725 
735 template<typename TKey, typename TMapped,
736  typename THasher = HashCoder<TKey>,
737  typename TEqualComparer = std::equal_to<TKey>,
738  typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>>
739 class unordered_multimap_open : public unordered_multimap_adaptor<HashMultiMap<TKey, TMapped,
740  HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketOpenDefault>, MemManagerStd<TAllocator>>>
741 {
742 private:
743  typedef unordered_multimap_adaptor<momo::HashMultiMap<TKey, TMapped,
746 
747 public:
748  using UnorderedMultiMapAdaptor::UnorderedMultiMapAdaptor;
749 
751  std::initializer_list<typename UnorderedMultiMapAdaptor::value_type> values)
752  {
754  return *this;
755  }
756 
757  friend void swap(unordered_multimap_open& left, unordered_multimap_open& right) noexcept
758  {
759  left.swap(right);
760  }
761 };
762 
763 #ifdef MOMO_HAS_DEDUCTION_GUIDES
764 
765 #define MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap) \
766 template<typename Iterator, \
767  typename Value = typename std::iterator_traits<Iterator>::value_type, \
768  typename Key = std::decay_t<typename Value::first_type>, \
769  typename Mapped = std::decay_t<typename Value::second_type>> \
770 unordered_multimap(Iterator, Iterator) \
771  -> unordered_multimap<Key, Mapped>; \
772 template<typename Iterator, \
773  typename Value = typename std::iterator_traits<Iterator>::value_type, \
774  typename Key = std::decay_t<typename Value::first_type>, \
775  typename Mapped = std::decay_t<typename Value::second_type>, \
776  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
777  typename = internal::hash_checker<Key, Allocator, HashCoder<Key>>> \
778 unordered_multimap(Iterator, Iterator, size_t, Allocator = Allocator()) \
779  -> unordered_multimap<Key, Mapped, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
780 template<typename Iterator, typename Hasher, \
781  typename Value = typename std::iterator_traits<Iterator>::value_type, \
782  typename Key = std::decay_t<typename Value::first_type>, \
783  typename Mapped = std::decay_t<typename Value::second_type>, \
784  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
785  typename = internal::hash_checker<Key, Allocator, Hasher>> \
786 unordered_multimap(Iterator, Iterator, size_t, Hasher, Allocator = Allocator()) \
787  -> unordered_multimap<Key, Mapped, Hasher, std::equal_to<Key>, Allocator>; \
788 template<typename Iterator, typename Hasher, typename EqualComparer, \
789  typename Value = typename std::iterator_traits<Iterator>::value_type, \
790  typename Key = std::decay_t<typename Value::first_type>, \
791  typename Mapped = std::decay_t<typename Value::second_type>, \
792  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
793  typename = internal::hash_checker<Key, Allocator, Hasher, EqualComparer>> \
794 unordered_multimap(Iterator, Iterator, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
795  -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>; \
796 template<typename QKey, typename Mapped, \
797  typename Key = std::remove_const_t<QKey>> \
798 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>) \
799  -> unordered_multimap<Key, Mapped>; \
800 template<typename QKey, typename Mapped, \
801  typename Key = std::remove_const_t<QKey>, \
802  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
803  typename = internal::hash_checker<Key, Allocator, HashCoder<Key>>> \
804 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>, size_t, Allocator = Allocator()) \
805  -> unordered_multimap<Key, Mapped, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
806 template<typename QKey, typename Mapped, typename Hasher, \
807  typename Key = std::remove_const_t<QKey>, \
808  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
809  typename = internal::hash_checker<Key, Allocator, Hasher>> \
810 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>, size_t, Hasher, Allocator = Allocator()) \
811  -> unordered_multimap<Key, Mapped, Hasher, std::equal_to<Key>, Allocator>; \
812 template<typename QKey, typename Mapped, typename Hasher, typename EqualComparer, \
813  typename Key = std::remove_const_t<QKey>, \
814  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
815  typename = internal::hash_checker<Key, Allocator, Hasher, EqualComparer>> \
816 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>, size_t, \
817  Hasher, EqualComparer, Allocator = Allocator()) \
818  -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>; \
819 template<typename Key, typename Mapped, typename Hasher, typename EqualComparer, typename Allocator> \
820 unordered_multimap(unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>, \
821  momo::internal::Identity<Allocator>) \
822  -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>;
823 
824 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap)
825 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap_open)
826 
827 #undef MOMO_DECLARE_DEDUCTION_GUIDES
828 
829 #ifdef MOMO_HAS_CONTAINERS_RANGES
830 
831 #define MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap) \
832 template<std::ranges::input_range Range, \
833  typename Value = std::ranges::range_value_t<Range>, \
834  typename Key = std::decay_t<typename Value::first_type>, \
835  typename Mapped = std::decay_t<typename Value::second_type>> \
836 unordered_multimap(std::from_range_t, Range&&) \
837  -> unordered_multimap<Key, Mapped>; \
838 template<std::ranges::input_range Range, \
839  typename Value = std::ranges::range_value_t<Range>, \
840  typename Key = std::decay_t<typename Value::first_type>, \
841  typename Mapped = std::decay_t<typename Value::second_type>, \
842  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
843  typename = internal::hash_checker<Key, Allocator, HashCoder<Key>>> \
844 unordered_multimap(std::from_range_t, Range&&, size_t, Allocator = Allocator()) \
845  -> unordered_multimap<Key, Mapped, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
846 template<std::ranges::input_range Range, typename Hasher, \
847  typename Value = std::ranges::range_value_t<Range>, \
848  typename Key = std::decay_t<typename Value::first_type>, \
849  typename Mapped = std::decay_t<typename Value::second_type>, \
850  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
851  typename = internal::hash_checker<Key, Allocator, Hasher>> \
852 unordered_multimap(std::from_range_t, Range&&, size_t, Hasher, Allocator = Allocator()) \
853  -> unordered_multimap<Key, Mapped, Hasher, std::equal_to<Key>, Allocator>; \
854 template<std::ranges::input_range Range, typename Hasher, typename EqualComparer, \
855  typename Value = std::ranges::range_value_t<Range>, \
856  typename Key = std::decay_t<typename Value::first_type>, \
857  typename Mapped = std::decay_t<typename Value::second_type>, \
858  typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
859  typename = internal::hash_checker<Key, Allocator, Hasher, EqualComparer>> \
860 unordered_multimap(std::from_range_t, Range&&, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
861  -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>;
862 
863 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap)
864 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap_open)
865 
866 #undef MOMO_DECLARE_DEDUCTION_GUIDES_RANGES
867 
868 #endif // MOMO_HAS_CONTAINERS_RANGES
869 
870 #endif // MOMO_HAS_DEDUCTION_GUIDES
871 
872 } // namespace stdish
873 
874 } // namespace momo
875 
876 #endif // MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
momo::stdish::unordered_multimap::swap
friend void swap(unordered_multimap &left, unordered_multimap &right) noexcept
Definition: unordered_multimap.h:720
momo::internal::ObjectManager
Definition: ObjectManager.h:394
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(std::initializer_list< value_type > values, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:157
momo::internal::HashMultiMapIterator
Definition: HashMultiMap.h:177
momo::stdish::unordered_multimap_adaptor::difference_type
ptrdiff_t difference_type
Definition: unordered_multimap.h:47
MOMO_DECLARE_PROXY_FUNCTION
#define MOMO_DECLARE_PROXY_FUNCTION(Class, Func)
Definition: Utility.h:116
momo::internal::HashDerivedIterator::Reference
TReference< typename BaseIterator::Reference > Reference
Definition: IteratorUtility.h:340
momo::stdish::unordered_multimap_adaptor::end
iterator end() noexcept
Definition: unordered_multimap.h:284
MOMO_THROW
#define MOMO_THROW(exception)
Definition: UserSettings.h:191
momo::stdish::unordered_multimap_adaptor::swap
void swap(unordered_multimap_adaptor &right) noexcept
Definition: unordered_multimap.h:249
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(const allocator_type &alloc)
Definition: unordered_multimap.h:87
momo::stdish::unordered_multimap_adaptor::const_iterator
iterator::ConstIterator const_iterator
Definition: unordered_multimap.h:55
momo::stdish::unordered_multimap_adaptor::equal_range
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< iterator, iterator > > equal_range(const KeyArg &key)
Definition: unordered_multimap.h:409
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor()
Definition: unordered_multimap.h:83
momo::stdish::unordered_multimap_adaptor::size
size_type size() const noexcept
Definition: unordered_multimap.h:322
momo::stdish::unordered_multimap_adaptor::emplace
iterator emplace(KeyArg &&keyArg, MappedArg &&mappedArg)
Definition: unordered_multimap.h:472
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:117
momo::stdish::unordered_multimap_adaptor::equal_range
MOMO_FORCEINLINE std::pair< const_iterator, const_iterator > equal_range(const key_type &key) const
Definition: unordered_multimap.h:390
momo::stdish::unordered_multimap_adaptor::end
const_iterator end() const noexcept
Definition: unordered_multimap.h:279
momo::stdish::unordered_multimap_adaptor::begin
iterator begin() noexcept
Definition: unordered_multimap.h:274
set_map_utility.h
momo::stdish::unordered_multimap_adaptor::operator=
unordered_multimap_adaptor & operator=(unordered_multimap_adaptor &&right) noexcept(momo::internal::ContainerAssignerStd::IsNothrowMoveAssignable< unordered_multimap_adaptor >::value)
Definition: unordered_multimap.h:232
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(const unordered_multimap_adaptor &right, const allocator_type &alloc)
Definition: unordered_multimap.h:225
momo::stdish::unordered_multimap_adaptor::key_equal
HashTraits::EqualComparer key_equal
Definition: unordered_multimap.h:42
momo::stdish::unordered_multimap_adaptor::emplace
iterator emplace()
Definition: unordered_multimap.h:448
momo::stdish::unordered_multimap::operator=
unordered_multimap & operator=(std::initializer_list< typename UnorderedMultiMapAdaptor::value_type > values)
Definition: unordered_multimap.h:713
momo::stdish::unordered_multimap_adaptor::const_reference
const_iterator::Reference const_reference
Definition: unordered_multimap.h:58
momo::HashMultiMapCore::Value
KeyValueTraits::Value Value
Definition: HashMultiMap.h:565
momo::stdish::unordered_multimap_adaptor::erase
iterator erase(const_iterator first, const_iterator last)
Definition: unordered_multimap.h:512
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(std::initializer_list< value_type > values, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:145
momo::HashMultiMapCore::MemManager
KeyValueTraits::MemManager MemManager
Definition: HashMultiMap.h:566
momo::stdish::unordered_multimap
momo::stdish::unordered_multimap is similar to std::unordered_multimap, but much more efficient in me...
Definition: unordered_multimap.h:704
momo::stdish::unordered_multimap_adaptor::find
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > find(const KeyArg &key) const
Definition: unordered_multimap.h:352
momo::internal::ProxyConstructor
Definition: Utility.h:238
momo::stdish::unordered_multimap_adaptor::operator==
friend bool operator==(const unordered_multimap_adaptor &left, const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:571
momo::stdish::unordered_multimap_adaptor::get_nested_container
nested_container_type & get_nested_container() noexcept
Definition: unordered_multimap.h:264
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:104
momo::stdish::unordered_multimap_open::operator=
unordered_multimap_open & operator=(std::initializer_list< typename UnorderedMultiMapAdaptor::value_type > values)
Definition: unordered_multimap.h:750
momo::stdish::unordered_multimap_adaptor::insert
momo::internal::EnableIf< std::is_constructible< value_type, ValueArg && >::value, iterator > insert(ValueArg &&valueArg)
Definition: unordered_multimap.h:416
momo::internal::HashMultiMapIterator::GetKeyIterator
KeyIterator GetKeyIterator() const noexcept
Definition: HashMultiMap.h:244
momo::stdish::unordered_multimap_adaptor::reference
iterator::Reference reference
Definition: unordered_multimap.h:57
momo::stdish::unordered_multimap_adaptor::get_nested_container
const nested_container_type & get_nested_container() const noexcept
Definition: unordered_multimap.h:259
momo::MemManagerStd
MemManagerStd uses allocator<unsigned char>::allocate and deallocate
Definition: MemManager.h:179
momo::stdish::unordered_multimap_adaptor::hasher
HashTraits::Hasher hasher
Definition: unordered_multimap.h:41
momo::stdish::unordered_multimap_adaptor::iterator
momo::internal::HashDerivedIterator< typename HashMultiMap::Iterator, momo::internal::MapReferenceStd > iterator
Definition: unordered_multimap.h:54
momo::stdish::unordered_multimap_adaptor::equal_range
MOMO_FORCEINLINE std::pair< iterator, iterator > equal_range(const key_type &key)
Definition: unordered_multimap.h:395
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:125
momo::stdish::unordered_multimap_adaptor::mapped_type
HashMultiMap::Value mapped_type
Definition: unordered_multimap.h:40
momo::stdish::unordered_multimap_adaptor::operator=
unordered_multimap_adaptor & operator=(const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:238
momo::internal::ContainerAssignerStd::Move
static Container & Move(Container &&srcCont, Container &dstCont) noexcept(IsNothrowMoveAssignable< Container >::value)
Definition: Utility.h:515
momo::stdish::unordered_multimap_adaptor::key_eq
key_equal key_eq() const
Definition: unordered_multimap.h:307
momo::stdish::unordered_multimap_adaptor::hash_function
hasher hash_function() const
Definition: unordered_multimap.h:302
momo::stdish::unordered_multimap_adaptor::allocator_type
std::allocator_traits< typename MemManager::ByteAllocator >::template rebind_alloc< value_type > allocator_type
Definition: unordered_multimap.h:51
momo::stdish::unordered_multimap_adaptor::empty
MOMO_NODISCARD bool empty() const noexcept
Definition: unordered_multimap.h:327
momo::stdish::unordered_multimap_adaptor::size_type
size_t size_type
Definition: unordered_multimap.h:46
momo::internal::EnableIf
typename std::enable_if< value, Type >::type EnableIf
Definition: Utility.h:199
momo::stdish::unordered_multimap_open
momo::stdish::unordered_multimap_open is similar to std::unordered_multimap, but much more efficient ...
Definition: unordered_multimap.h:741
momo
Definition: Array.h:27
momo::stdish::unordered_multimap_open::swap
friend void swap(unordered_multimap_open &left, unordered_multimap_open &right) noexcept
Definition: unordered_multimap.h:757
momo::stdish::unordered_multimap_adaptor::erase
iterator erase(iterator where)
Definition: unordered_multimap.h:507
momo::internal::ContainerAssignerStd::IsNothrowMoveAssignable
BoolConstant< std::is_empty< Allocator >::value||std::allocator_traits< Allocator >::propagate_on_container_move_assignment::value > IsNothrowMoveAssignable
Definition: Utility.h:511
momo::stdish::unordered_multimap_adaptor::max_size
size_type max_size() const noexcept
Definition: unordered_multimap.h:317
momo::stdish::unordered_multimap_adaptor::emplace_hint
iterator emplace_hint(const_iterator, std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs)
Definition: unordered_multimap.h:492
momo::HashCoder< TKey >
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(unordered_multimap_adaptor &&right)
Definition: unordered_multimap.h:200
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(std::initializer_list< value_type > values, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:151
momo::stdish::unordered_multimap_adaptor::cbegin
const_iterator cbegin() const noexcept
Definition: unordered_multimap.h:289
momo::stdish::unordered_multimap_adaptor::erase
size_type erase(const key_type &key)
Definition: unordered_multimap.h:540
momo::internal::IteratorPointer
Definition: IteratorUtility.h:228
momo::stdish::unordered_multimap_adaptor::const_pointer
const_iterator::Pointer const_pointer
Definition: unordered_multimap.h:61
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(unordered_multimap_adaptor &&right, const allocator_type &alloc)
Definition: unordered_multimap.h:205
momo::stdish::unordered_multimap_adaptor::swap
friend void swap(unordered_multimap_adaptor &left, unordered_multimap_adaptor &right) noexcept
Definition: unordered_multimap.h:254
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:220
momo::stdish::unordered_multimap_adaptor::contains
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > contains(const KeyArg &key) const
Definition: unordered_multimap.h:385
momo::HashMultiMapCore::Key
KeyValueTraits::Key Key
Definition: HashMultiMap.h:564
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(Iterator first, Iterator last)
Definition: unordered_multimap.h:111
momo::stdish::unordered_multimap_adaptor::pointer
iterator::Pointer pointer
Definition: unordered_multimap.h:60
momo::stdish::unordered_multimap_adaptor::contains
MOMO_FORCEINLINE bool contains(const key_type &key) const
Definition: unordered_multimap.h:378
momo::stdish::unordered_multimap_adaptor::key_type
HashMultiMap::Key key_type
Definition: unordered_multimap.h:39
momo::stdish::unordered_multimap_adaptor::insert
momo::internal::EnableIf< std::is_constructible< value_type, ValueArg && >::value, iterator > insert(const_iterator, ValueArg &&valueArg)
Definition: unordered_multimap.h:423
momo::HashTraitsStd
Definition: HashTraits.h:196
momo::internal::HashDerivedIterator
Definition: IteratorUtility.h:335
momo::stdish::unordered_multimap_adaptor::emplace_hint
iterator emplace_hint(const_iterator, ValueArg &&valueArg)
Definition: unordered_multimap.h:466
momo::HashMultiMapCore::Iterator
internal::HashMultiMapIterator< KeyIterator, Settings > Iterator
Definition: HashMultiMap.h:672
momo::internal::ObjectBuffer
Definition: ObjectManager.h:190
momo::stdish::unordered_multimap_adaptor::emplace_hint
iterator emplace_hint(const_iterator, KeyArg &&keyArg, MappedArg &&mappedArg)
Definition: unordered_multimap.h:479
std
Definition: Array.h:1178
momo::stdish::unordered_multimap_adaptor::clear
void clear() noexcept
Definition: unordered_multimap.h:332
MOMO_FORCEINLINE
#define MOMO_FORCEINLINE
Definition: UserSettings.h:125
momo::stdish::unordered_multimap_adaptor
Definition: unordered_multimap.h:32
momo::HashMultiMap
HashMultiMapCore< HashMultiMapKeyValueTraits< TKey, TValue, TMemManager >, THashTraits > HashMultiMap
Definition: HashMultiMap.h:1221
momo::stdish::unordered_multimap_adaptor::~unordered_multimap_adaptor
~unordered_multimap_adaptor()=default
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:98
momo::stdish::unordered_multimap_adaptor::insert
void insert(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:434
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:133
momo::stdish::unordered_multimap_adaptor::count
MOMO_FORCEINLINE size_type count(const key_type &key) const
Definition: unordered_multimap.h:364
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:92
momo::stdish::unordered_multimap_adaptor::begin
const_iterator begin() const noexcept
Definition: unordered_multimap.h:269
momo::HashMultiMapCore
Definition: HashMultiMap.h:559
momo::stdish::unordered_multimap_adaptor::find
MOMO_FORCEINLINE iterator find(const key_type &key)
Definition: unordered_multimap.h:345
momo::stdish::unordered_multimap_adaptor::unordered_multimap_adaptor
unordered_multimap_adaptor(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:140
momo::stdish::unordered_multimap_adaptor::emplace
iterator emplace(std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs)
Definition: unordered_multimap.h:485
momo::internal::ContainerAssignerStd::Copy
static Container & Copy(const Container &srcCont, Container &dstCont)
Definition: Utility.h:531
momo::stdish::unordered_multimap_adaptor::nested_container_type
HashMultiMap nested_container_type
Definition: unordered_multimap.h:44
momo::stdish::unordered_multimap_adaptor::insert
void insert(Iterator first, Iterator last)
Definition: unordered_multimap.h:429
momo::stdish::unordered_multimap_adaptor::emplace_hint
iterator emplace_hint(const_iterator)
Definition: unordered_multimap.h:453
momo::stdish::unordered_multimap_adaptor::find
MOMO_FORCEINLINE const_iterator find(const key_type &key) const
Definition: unordered_multimap.h:340
momo::stdish::unordered_multimap_adaptor::value_type
std::pair< const key_type, mapped_type > value_type
Definition: unordered_multimap.h:49
momo::stdish::unordered_multimap_adaptor::count
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > count(const KeyArg &key) const
Definition: unordered_multimap.h:372
momo::internal::ContainerAssignerStd::Swap
static void Swap(Container &cont1, Container &cont2) noexcept
Definition: Utility.h:546
momo::stdish::unordered_multimap_adaptor::erase_if
friend size_type erase_if(unordered_multimap_adaptor &cont, const ValueFilter &valueFilter)
Definition: unordered_multimap.h:546
momo::stdish::unordered_multimap_adaptor::operator!=
friend bool operator!=(const unordered_multimap_adaptor &left, const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:594
momo::stdish::unordered_multimap_adaptor::cend
const_iterator cend() const noexcept
Definition: unordered_multimap.h:294
momo::stdish::unordered_multimap_adaptor::get_allocator
allocator_type get_allocator() const noexcept
Definition: unordered_multimap.h:312
momo::stdish::unordered_multimap_adaptor::emplace
iterator emplace(ValueArg &&valueArg)
Definition: unordered_multimap.h:459
momo::stdish::unordered_multimap_adaptor::erase
iterator erase(const_iterator where)
Definition: unordered_multimap.h:498
momo::HashMultiMapCore::MakeIterator
ConstIterator MakeIterator(ConstKeyIterator keyIter, size_t valueIndex=0) const
Definition: HashMultiMap.h:1096
MOMO_NODISCARD
#define MOMO_NODISCARD
Definition: UserSettings.h:262
momo::HashMultiMapCore::GetEnd
ConstIterator GetEnd() const noexcept
Definition: HashMultiMap.h:793
momo::HashMultiMapCore::HashTraits
THashTraits HashTraits
Definition: HashMultiMap.h:562
momo::stdish::unordered_multimap_adaptor::find
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, iterator > find(const KeyArg &key)
Definition: unordered_multimap.h:359
momo::stdish::unordered_multimap_adaptor::equal_range
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< const_iterator, const_iterator > > equal_range(const KeyArg &key) const
Definition: unordered_multimap.h:402
momo::internal::MapReferenceStd
Definition: MapUtility.h:68
momo::stdish::unordered_multimap_adaptor::operator=
unordered_multimap_adaptor & operator=(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:243