Go to the documentation of this file.
17 #ifndef MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
18 #define MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
21 # if __has_include(<momo/Utility.h>)
25 #ifndef MOMO_PARENT_HEADER
26 # include "../Utility.h"
29 #include MOMO_PARENT_HEADER(HashMultiMap)
67 template<
typename TKey,
typename TMapped,
68 typename THasher = HashCoder<TKey>,
69 typename TEqualComparer = std::equal_to<TKey>,
70 typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>,
71 typename THashMultiMap = HashMultiMap<TKey, TMapped, HashTraitsStd<TKey, THasher, TEqualComparer>,
72 MemManagerStd<TAllocator>>>
76 typedef THashMultiMap HashMultiMap;
92 typedef std::pair<const key_type, mapped_type>
value_type;
112 template<
typename KeyArg>
113 struct IsValidKeyArg :
public HashTraits::template IsValidKeyArg<KeyArg>
124 struct IteratorProxy :
public iterator
136 : mHashMultiMap(HashTraits(), MemManager(alloc))
142 : mHashMultiMap(HashTraits(bucketCount), MemManager(alloc))
148 : mHashMultiMap(HashTraits(bucketCount, hashFunc), MemManager(alloc))
154 : mHashMultiMap(HashTraits(bucketCount, hashFunc, equalComp), MemManager(alloc))
158 template<
typename Iterator>
164 template<
typename Iterator>
172 template<
typename Iterator>
180 template<
typename Iterator>
213 #ifdef MOMO_HAS_CONTAINERS_RANGES
214 template<std::ranges::input_range Range>
215 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
218 insert_range(std::forward<Range>(values));
221 template<std::ranges::input_range Range>
222 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
227 insert_range(std::forward<Range>(values));
230 template<std::ranges::input_range Range>
231 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
236 insert_range(std::forward<Range>(values));
239 template<std::ranges::input_range Range>
240 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
246 insert_range(std::forward<Range>(values));
248 #endif // MOMO_HAS_CONTAINERS_RANGES
257 : mHashMultiMap(right.mHashMultiMap.GetHashTraits(), MemManager(alloc))
259 if (right.get_allocator() == alloc)
261 mHashMultiMap.Swap(right.mHashMultiMap);
266 mHashMultiMap.Add(ref.first, std::move(ref.second));
272 : mHashMultiMap(right.mHashMultiMap)
278 : mHashMultiMap(right.mHashMultiMap, MemManager(alloc))
297 mHashMultiMap = HashMultiMap(values, mHashMultiMap.GetHashTraits(), MemManager(
get_allocator()));
313 return mHashMultiMap;
318 return mHashMultiMap;
323 return ConstIteratorProxy(mHashMultiMap.GetBegin());
328 return IteratorProxy(mHashMultiMap.GetBegin());
333 return ConstIteratorProxy(mHashMultiMap.GetEnd());
338 return IteratorProxy(mHashMultiMap.GetEnd());
356 return mHashMultiMap.GetHashTraits().GetHasher();
361 return mHashMultiMap.GetHashTraits().GetEqualComparer();
366 return allocator_type(mHashMultiMap.GetMemManager().GetByteAllocator());
371 return std::allocator_traits<allocator_type>::max_size(
get_allocator());
376 return mHashMultiMap.GetCount();
381 return mHashMultiMap.IsEmpty();
386 mHashMultiMap.Clear();
402 template<
typename KeyArg>
409 template<
typename KeyArg>
419 return !!keyIter ? keyIter->GetCount() : 0;
422 template<
typename KeyArg>
427 return !!keyIter ? keyIter->GetCount() : 0;
432 return count(key) > 0;
435 template<
typename KeyArg>
439 return count(key) > 0;
444 return pvEqualRange<const_iterator, ConstIteratorProxy>(mHashMultiMap,
445 mHashMultiMap.Find(key));
450 return pvEqualRange<iterator, IteratorProxy>(mHashMultiMap, mHashMultiMap.Find(key));
453 template<
typename KeyArg>
455 std::pair<const_iterator, const_iterator>>
equal_range(
const KeyArg& key)
const
457 return pvEqualRange<const_iterator, ConstIteratorProxy>(mHashMultiMap,
458 mHashMultiMap.Find(key));
461 template<
typename KeyArg>
465 return pvEqualRange<iterator, IteratorProxy>(mHashMultiMap, mHashMultiMap.Find(key));
468 template<
typename ValueArg = std::pair<key_type, mapped_type>>
472 return emplace(std::forward<ValueArg>(valueArg));
475 template<
typename ValueArg = std::pair<key_type, mapped_type>>
479 return insert(std::forward<ValueArg>(valueArg));
482 template<
typename Iterator>
483 void insert(Iterator first, Iterator last)
485 pvInsertRange(first, last);
488 void insert(std::initializer_list<value_type> values)
490 mHashMultiMap.Add(values.begin(), values.end());
493 #ifdef MOMO_HAS_CONTAINERS_RANGES
494 template<std::ranges::input_range Range>
495 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
496 void insert_range(Range&& values)
498 pvInsertRange(std::ranges::begin(values), std::ranges::end(values));
500 #endif // MOMO_HAS_CONTAINERS_RANGES
504 return pvEmplace(std::tuple<>(), std::tuple<>());
512 template<
typename ValueArg>
515 return pvEmplace(std::forward_as_tuple(std::get<0>(std::forward<ValueArg>(valueArg))),
516 std::forward_as_tuple(std::get<1>(std::forward<ValueArg>(valueArg))));
519 template<
typename ValueArg>
522 return emplace(std::forward<ValueArg>(valueArg));
525 template<
typename KeyArg,
typename MappedArg>
528 return pvEmplace(std::forward_as_tuple(std::forward<KeyArg>(keyArg)),
529 std::forward_as_tuple(std::forward<MappedArg>(mappedArg)));
532 template<
typename KeyArg,
typename MappedArg>
535 return emplace(std::forward<KeyArg>(keyArg), std::forward<MappedArg>(mappedArg));
538 template<
typename... KeyArgs,
typename... MappedArgs>
540 std::tuple<KeyArgs...> keyArgs, std::tuple<MappedArgs...> mappedArgs)
542 return pvEmplace(std::move(keyArgs), std::move(mappedArgs));
545 template<
typename... KeyArgs,
typename... MappedArgs>
547 std::tuple<KeyArgs...> keyArgs, std::tuple<MappedArgs...> mappedArgs)
549 return pvEmplace(std::move(keyArgs), std::move(mappedArgs));
556 if (keyIter->GetCount() == 1)
557 return IteratorProxy(mHashMultiMap.MakeIterator(mHashMultiMap.RemoveKey(keyIter)));
559 return IteratorProxy(mHashMultiMap.Remove(iter));
569 if (first ==
begin() && last ==
end())
576 return IteratorProxy(mHashMultiMap.MakeMutableIterator(
577 ConstIteratorProxy::GetBaseIterator(first)));
581 if (std::next(first) == last)
584 ConstIteratorProxy::GetBaseIterator(first).GetKeyIterator();
585 if (last == ConstIteratorProxy(mHashMultiMap.MakeIterator(keyIter, keyIter->GetCount())))
586 return IteratorProxy(mHashMultiMap.MakeIterator(mHashMultiMap.RemoveKey(keyIter)));
588 throw std::invalid_argument(
"invalid unordered_multimap erase arguments");
593 return mHashMultiMap.RemoveKey(key);
596 template<
typename ValueFilter>
601 return cont.mHashMultiMap.Remove(pairFilter);
624 if (left.mHashMultiMap.GetKeyCount() != right.mHashMultiMap.GetKeyCount())
626 if (left.mHashMultiMap.GetCount() != right.mHashMultiMap.GetCount())
629 for (
typename ConstKeyIterator::Reference ref : left.mHashMultiMap.GetKeyBounds())
631 if (ref.GetCount() == 0)
633 ConstKeyIterator rightKeyIter = right.mHashMultiMap.Find(ref.key);
636 if (ref.GetCount() != rightKeyIter->GetCount())
638 if (!std::is_permutation(ref.GetBegin(), ref.GetEnd(), rightKeyIter->GetBegin()))
646 return !(left == right);
650 template<
typename Iterator,
typename IteratorProxy,
typename HashMultiMap,
typename KeyIterator>
651 static std::pair<Iterator, Iterator> pvEqualRange(
HashMultiMap& hashMultiMap,
654 Iterator
end = IteratorProxy(hashMultiMap.
GetEnd());
657 size_t count = keyIter->GetCount();
660 Iterator first = IteratorProxy(hashMultiMap.
MakeIterator(keyIter, 0));
662 return { first, last };
665 template<
typename... KeyArgs,
typename... MappedArgs>
666 iterator pvEmplace(std::tuple<KeyArgs...>&& keyArgs, std::tuple<MappedArgs...>&& mappedArgs)
668 typedef typename HashMultiMap::KeyValueTraits
669 ::template ValueCreator<MappedArgs...> MappedCreator;
670 return pvInsert(std::move(keyArgs),
671 MappedCreator(mHashMultiMap.GetMemManager(), std::move(mappedArgs)));
674 template<
typename... KeyArgs,
typename MappedCreator>
675 iterator pvInsert(std::tuple<KeyArgs...>&& keyArgs, MappedCreator&& mappedCreator)
677 MemManager& memManager = mHashMultiMap.GetMemManager();
680 typedef typename KeyManager::template Creator<KeyArgs...> KeyCreator;
682 KeyCreator(memManager, std::move(keyArgs))(keyBuffer.GetPtr());
686 resIter = pvInsert(std::forward_as_tuple(std::move(keyBuffer.Get())),
687 std::forward<MappedCreator>(mappedCreator));
691 KeyManager::Destroy(memManager, keyBuffer.Get());
694 KeyManager::Destroy(memManager, keyBuffer.Get());
698 template<
typename RKey,
typename MappedCreator,
699 typename Key =
typename std::decay<RKey>::type>
701 iterator> pvInsert(std::tuple<RKey>&& key, MappedCreator&& mappedCreator)
703 return IteratorProxy(mHashMultiMap.AddCrt(
704 std::forward<RKey>(std::get<0>(key)), std::forward<MappedCreator>(mappedCreator)));
707 template<
typename Iterator,
typename Sentinel>
709 void> pvInsertRange(Iterator
begin, Sentinel
end)
711 mHashMultiMap.Add(std::move(
begin), std::move(
end));
714 template<
typename Iterator,
typename Sentinel>
716 void> pvInsertRange(Iterator
begin, Sentinel
end)
718 for (Iterator iter = std::move(
begin); iter !=
end; ++iter)
723 HashMultiMap mHashMultiMap;
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>>>
740 HashMultiMap<TKey, TMapped, HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketOpenDefault>,
741 MemManagerStd<TAllocator>>>
756 using UnorderedMultiMap::UnorderedMultiMap;
769 template<
typename ValueFilter>
774 return cont.get_nested_container().Remove(pairFilter);
778 #ifdef MOMO_HAS_DEDUCTION_GUIDES
780 #define MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap) \
781 template<typename Iterator, \
782 typename Value = typename std::iterator_traits<Iterator>::value_type, \
783 typename Key = std::decay_t<typename Value::first_type>, \
784 typename Mapped = std::decay_t<typename Value::second_type>> \
785 unordered_multimap(Iterator, Iterator) \
786 -> unordered_multimap<Key, Mapped>; \
787 template<typename Iterator, \
788 typename Value = typename std::iterator_traits<Iterator>::value_type, \
789 typename Key = std::decay_t<typename Value::first_type>, \
790 typename Mapped = std::decay_t<typename Value::second_type>, \
791 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
792 typename = internal::unordered_checker<Key, Allocator, HashCoder<Key>>> \
793 unordered_multimap(Iterator, Iterator, size_t, Allocator = Allocator()) \
794 -> unordered_multimap<Key, Mapped, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
795 template<typename Iterator, typename Hasher, \
796 typename Value = typename std::iterator_traits<Iterator>::value_type, \
797 typename Key = std::decay_t<typename Value::first_type>, \
798 typename Mapped = std::decay_t<typename Value::second_type>, \
799 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
800 typename = internal::unordered_checker<Key, Allocator, Hasher>> \
801 unordered_multimap(Iterator, Iterator, size_t, Hasher, Allocator = Allocator()) \
802 -> unordered_multimap<Key, Mapped, Hasher, std::equal_to<Key>, Allocator>; \
803 template<typename Iterator, typename Hasher, typename EqualComparer, \
804 typename Value = typename std::iterator_traits<Iterator>::value_type, \
805 typename Key = std::decay_t<typename Value::first_type>, \
806 typename Mapped = std::decay_t<typename Value::second_type>, \
807 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
808 typename = internal::unordered_checker<Key, Allocator, Hasher, EqualComparer>> \
809 unordered_multimap(Iterator, Iterator, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
810 -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>; \
811 template<typename QKey, typename Mapped, \
812 typename Key = std::remove_const_t<QKey>> \
813 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>) \
814 -> unordered_multimap<Key, Mapped>; \
815 template<typename QKey, typename Mapped, \
816 typename Key = std::remove_const_t<QKey>, \
817 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
818 typename = internal::unordered_checker<Key, Allocator, HashCoder<Key>>> \
819 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>, size_t, Allocator = Allocator()) \
820 -> unordered_multimap<Key, Mapped, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
821 template<typename QKey, typename Mapped, typename Hasher, \
822 typename Key = std::remove_const_t<QKey>, \
823 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
824 typename = internal::unordered_checker<Key, Allocator, Hasher>> \
825 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>, size_t, Hasher, Allocator = Allocator()) \
826 -> unordered_multimap<Key, Mapped, Hasher, std::equal_to<Key>, Allocator>; \
827 template<typename QKey, typename Mapped, typename Hasher, typename EqualComparer, \
828 typename Key = std::remove_const_t<QKey>, \
829 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
830 typename = internal::unordered_checker<Key, Allocator, Hasher, EqualComparer>> \
831 unordered_multimap(std::initializer_list<std::pair<QKey, Mapped>>, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
832 -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>;
834 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap)
835 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap_open)
837 #undef MOMO_DECLARE_DEDUCTION_GUIDES
839 #ifdef MOMO_HAS_CONTAINERS_RANGES
841 #define MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap) \
842 template<std::ranges::input_range Range, \
843 typename Value = std::ranges::range_value_t<Range>, \
844 typename Key = std::decay_t<typename Value::first_type>, \
845 typename Mapped = std::decay_t<typename Value::second_type>> \
846 unordered_multimap(std::from_range_t, Range&&) \
847 -> unordered_multimap<Key, Mapped>; \
848 template<std::ranges::input_range Range, \
849 typename Value = std::ranges::range_value_t<Range>, \
850 typename Key = std::decay_t<typename Value::first_type>, \
851 typename Mapped = std::decay_t<typename Value::second_type>, \
852 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
853 typename = internal::unordered_checker<Key, Allocator, HashCoder<Key>>> \
854 unordered_multimap(std::from_range_t, Range&&, size_t, Allocator = Allocator()) \
855 -> unordered_multimap<Key, Mapped, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
856 template<std::ranges::input_range Range, typename Hasher, \
857 typename Value = std::ranges::range_value_t<Range>, \
858 typename Key = std::decay_t<typename Value::first_type>, \
859 typename Mapped = std::decay_t<typename Value::second_type>, \
860 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
861 typename = internal::unordered_checker<Key, Allocator, Hasher>> \
862 unordered_multimap(std::from_range_t, Range&&, size_t, Hasher, Allocator = Allocator()) \
863 -> unordered_multimap<Key, Mapped, Hasher, std::equal_to<Key>, Allocator>; \
864 template<std::ranges::input_range Range, typename Hasher, typename EqualComparer, \
865 typename Value = std::ranges::range_value_t<Range>, \
866 typename Key = std::decay_t<typename Value::first_type>, \
867 typename Mapped = std::decay_t<typename Value::second_type>, \
868 typename Allocator = std::allocator<std::pair<const Key, Mapped>>, \
869 typename = internal::unordered_checker<Key, Allocator, Hasher, EqualComparer>> \
870 unordered_multimap(std::from_range_t, Range&&, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
871 -> unordered_multimap<Key, Mapped, Hasher, EqualComparer, Allocator>;
873 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap)
874 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap_open)
876 #undef MOMO_DECLARE_DEDUCTION_GUIDES_RANGES
878 #endif // MOMO_HAS_CONTAINERS_RANGES
880 #endif // MOMO_HAS_DEDUCTION_GUIDES
886 #endif // MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
friend void swap(unordered_multimap &left, unordered_multimap &right) noexcept
Definition: unordered_multimap.h:306
TMapped mapped_type
Definition: unordered_multimap.h:82
Definition: ObjectManager.h:240
unordered_multimap(size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:140
internal::HashMultiMapIterator< KeyIterator, Settings > Iterator
Definition: HashMultiMap.h:674
iterator emplace(KeyArg &&keyArg, MappedArg &&mappedArg)
Definition: unordered_multimap.h:526
Definition: HashMultiMap.h:182
const_iterator::Reference const_reference
Definition: unordered_multimap.h:99
iterator emplace_hint(const_iterator, ValueArg &&valueArg)
Definition: unordered_multimap.h:520
ConstIterator MakeIterator(ConstKeyIterator keyIter, size_t valueIndex=0) const
Definition: HashMultiMap.h:1132
TReference< typename BaseIterator::Reference > Reference
Definition: IteratorUtility.h:381
size_type erase(const key_type &key)
Definition: unordered_multimap.h:591
void swap(unordered_multimap &right) noexcept
Definition: unordered_multimap.h:301
const_iterator cbegin() const noexcept
Definition: unordered_multimap.h:341
iterator erase(iterator where)
Definition: unordered_multimap.h:562
TMapped mapped_type
Definition: unordered_multimap.h:82
ptrdiff_t difference_type
Definition: unordered_multimap.h:90
THashTraits HashTraits
Definition: HashMultiMap.h:564
unordered_multimap(unordered_multimap &&right, const momo::internal::Identity< allocator_type > &alloc)
Definition: unordered_multimap.h:255
unordered_multimap(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:173
size_t size_type
Definition: unordered_multimap.h:89
MOMO_FORCEINLINE std::pair< const_iterator, const_iterator > equal_range(const key_type &key) const
Definition: unordered_multimap.h:442
iterator::Pointer pointer
Definition: unordered_multimap.h:101
friend bool operator!=(const unordered_multimap &left, const unordered_multimap &right)
Definition: unordered_multimap.h:644
unordered_multimap & operator=(const unordered_multimap &right)
Definition: unordered_multimap.h:290
unordered_multimap(std::initializer_list< momo::internal::Identity< value_type >> values, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:200
momo::internal::EnableIf< std::is_constructible< value_type, ValueArg && >::value, iterator > insert(const_iterator, ValueArg &&valueArg)
Definition: unordered_multimap.h:477
iterator erase(const_iterator first, const_iterator last)
Definition: unordered_multimap.h:567
TKey key_type
Definition: unordered_multimap.h:81
unordered_multimap(const unordered_multimap &right)
Definition: unordered_multimap.h:271
momo::stdish::unordered_multimap is similar to std::unordered_multimap, but much more efficient in me...
Definition: unordered_multimap.h:74
unordered_multimap()
Definition: unordered_multimap.h:131
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > contains(const KeyArg &key) const
Definition: unordered_multimap.h:437
unordered_multimap(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:181
MOMO_FORCEINLINE bool contains(const key_type &key) const
Definition: unordered_multimap.h:430
MOMO_FORCEINLINE size_type count(const key_type &key) const
Definition: unordered_multimap.h:416
KeyIterator GetKeyIterator() const noexcept
Definition: HashMultiMap.h:249
const_iterator::Reference const_reference
Definition: unordered_multimap.h:99
MemManagerStd uses allocator<unsigned char>::allocate and deallocate
Definition: MemManager.h:177
void insert(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:488
size_type size() const noexcept
Definition: unordered_multimap.h:374
~unordered_multimap()=default
unordered_multimap & operator=(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:295
unordered_multimap(std::initializer_list< momo::internal::Identity< value_type >> values)
Definition: unordered_multimap.h:189
static Container & Move(Container &&srcCont, Container &dstCont) noexcept(IsNothrowMoveAssignable< Container >::value)
Definition: Utility.h:496
const_iterator::Pointer const_pointer
Definition: unordered_multimap.h:102
void insert(Iterator first, Iterator last)
Definition: unordered_multimap.h:483
momo::internal::EnableIf< std::is_constructible< value_type, ValueArg && >::value, iterator > insert(ValueArg &&valueArg)
Definition: unordered_multimap.h:470
friend size_type erase_if(unordered_multimap &cont, const ValueFilter &valueFilter)
Definition: unordered_multimap.h:597
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > count(const KeyArg &key) const
Definition: unordered_multimap.h:424
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< const_iterator, const_iterator > > equal_range(const KeyArg &key) const
Definition: unordered_multimap.h:455
unordered_multimap(unordered_multimap &&right)
Definition: unordered_multimap.h:250
typename std::enable_if< value, Type >::type EnableIf
Definition: Utility.h:209
momo::internal::HashDerivedIterator< typename HashMultiMap::Iterator, momo::internal::MapReferenceStd > iterator
Definition: unordered_multimap.h:95
iterator emplace_hint(const_iterator, std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs)
Definition: unordered_multimap.h:546
momo::stdish::unordered_multimap_open is similar to std::unordered_multimap, but much more efficient ...
Definition: unordered_multimap.h:742
const_iterator cend() const noexcept
Definition: unordered_multimap.h:346
friend void swap(unordered_multimap_open &left, unordered_multimap_open &right) noexcept
Definition: unordered_multimap.h:764
BoolConstant< std::is_empty< Allocator >::value||std::allocator_traits< Allocator >::propagate_on_container_move_assignment::value > IsNothrowMoveAssignable
Definition: Utility.h:492
iterator erase(const_iterator where)
Definition: unordered_multimap.h:552
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, iterator > find(const KeyArg &key)
Definition: unordered_multimap.h:411
iterator emplace(std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs)
Definition: unordered_multimap.h:539
Definition: IteratorUtility.h:264
unordered_multimap & operator=(unordered_multimap &&right) noexcept(momo::internal::ContainerAssignerStd::IsNothrowMoveAssignable< unordered_multimap >::value)
Definition: unordered_multimap.h:284
iterator::ConstIterator const_iterator
Definition: unordered_multimap.h:96
EnableIf< true, Type > Identity
Definition: Utility.h:212
iterator begin() noexcept
Definition: unordered_multimap.h:326
unordered_multimap(size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:152
unordered_multimap(const unordered_multimap &right, const momo::internal::Identity< allocator_type > &alloc)
Definition: unordered_multimap.h:276
friend size_type erase_if(unordered_multimap_open &cont, const ValueFilter &valueFilter)
Definition: unordered_multimap.h:770
size_type max_size() const noexcept
Definition: unordered_multimap.h:369
#define MOMO_DECLARE_PROXY_CONSTRUCTOR(Object)
Definition: Utility.h:118
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > find(const KeyArg &key) const
Definition: unordered_multimap.h:404
hasher hash_function() const
Definition: unordered_multimap.h:354
const_iterator begin() const noexcept
Definition: unordered_multimap.h:321
nested_container_type & get_nested_container() noexcept
Definition: unordered_multimap.h:316
MOMO_FORCEINLINE iterator find(const key_type &key)
Definition: unordered_multimap.h:397
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< iterator, iterator > > equal_range(const KeyArg &key)
Definition: unordered_multimap.h:463
MOMO_FORCEINLINE std::pair< iterator, iterator > equal_range(const key_type &key)
Definition: unordered_multimap.h:448
const nested_container_type & get_nested_container() const noexcept
Definition: unordered_multimap.h:311
unordered_multimap(const allocator_type &alloc)
Definition: unordered_multimap.h:135
iterator::Reference reference
Definition: unordered_multimap.h:98
unordered_multimap(std::initializer_list< momo::internal::Identity< value_type >> values, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:206
Definition: IteratorUtility.h:376
void clear() noexcept
Definition: unordered_multimap.h:384
unordered_multimap(Iterator first, Iterator last)
Definition: unordered_multimap.h:159
#define MOMO_DECLARE_PROXY_FUNCTION(Object, Func)
Definition: Utility.h:126
TKey key_type
Definition: unordered_multimap.h:81
HashMultiMap nested_container_type
Definition: unordered_multimap.h:87
Definition: ObjectManager.h:189
const_iterator end() const noexcept
Definition: unordered_multimap.h:331
friend bool operator==(const unordered_multimap &left, const unordered_multimap &right)
Definition: unordered_multimap.h:622
#define MOMO_FORCEINLINE
Definition: UserSettings.h:119
unordered_multimap(std::initializer_list< momo::internal::Identity< value_type >> values, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:194
MOMO_FORCEINLINE const_iterator find(const key_type &key) const
Definition: unordered_multimap.h:392
ConstIterator GetEnd() const noexcept
Definition: HashMultiMap.h:827
key_equal key_eq() const
Definition: unordered_multimap.h:359
unordered_multimap(size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:146
Definition: HashMultiMap.h:560
TMemManager MemManager
Definition: HashMultiMap.h:565
iterator emplace()
Definition: unordered_multimap.h:502
allocator_type get_allocator() const noexcept
Definition: unordered_multimap.h:364
iterator end() noexcept
Definition: unordered_multimap.h:336
iterator emplace_hint(const_iterator)
Definition: unordered_multimap.h:507
TAllocator allocator_type
Definition: unordered_multimap.h:85
static Container & Copy(const Container &srcCont, Container &dstCont)
Definition: Utility.h:512
iterator emplace(ValueArg &&valueArg)
Definition: unordered_multimap.h:513
unordered_multimap_open & operator=(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:758
unordered_multimap(Iterator first, Iterator last, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:165
std::pair< const key_type, mapped_type > value_type
Definition: unordered_multimap.h:92
static void Swap(Container &cont1, Container &cont2) noexcept
Definition: Utility.h:527
size_t size_type
Definition: unordered_multimap.h:89
THasher hasher
Definition: unordered_multimap.h:83
TEqualComparer key_equal
Definition: unordered_multimap.h:84
MOMO_NODISCARD bool empty() const noexcept
Definition: unordered_multimap.h:379
#define MOMO_NODISCARD
Definition: UserSettings.h:217
iterator emplace_hint(const_iterator, KeyArg &&keyArg, MappedArg &&mappedArg)
Definition: unordered_multimap.h:533
Definition: MapUtility.h:68