Go to the documentation of this file.
18 #ifndef MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
19 #define MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
22 #include MOMO_PARENT_HEADER(HashMultiMap)
30 template<
typename THashMultiMap>
34 typedef THashMultiMap HashMultiMap;
41 typedef typename HashTraits::Hasher
hasher;
42 typedef typename HashTraits::EqualComparer
key_equal;
49 typedef std::pair<const key_type, mapped_type>
value_type;
50 typedef typename std::allocator_traits<typename MemManager::ByteAllocator>
71 template<
typename KeyArg>
72 struct IsValidKeyArg :
public HashTraits::template IsValidKeyArg<KeyArg>
88 : mHashMultiMap(HashTraits(), MemManager(alloc))
94 : mHashMultiMap(HashTraits(bucketCount), MemManager(alloc))
100 : mHashMultiMap(HashTraits(bucketCount, hashFunc), MemManager(alloc))
106 : mHashMultiMap(HashTraits(bucketCount, hashFunc, equalComp), MemManager(alloc))
110 template<
typename Iterator>
116 template<
typename Iterator>
124 template<
typename Iterator>
132 template<
typename Iterator>
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>
168 insert_range(std::forward<Range>(values));
171 template<std::ranges::input_range Range>
172 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
177 insert_range(std::forward<Range>(values));
180 template<std::ranges::input_range Range>
181 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
186 insert_range(std::forward<Range>(values));
189 template<std::ranges::input_range Range>
190 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
196 insert_range(std::forward<Range>(values));
198 #endif // MOMO_HAS_CONTAINERS_RANGES
206 : mHashMultiMap(right.mHashMultiMap.GetHashTraits(), MemManager(alloc))
208 if (right.get_allocator() == alloc)
210 mHashMultiMap.Swap(right.mHashMultiMap);
215 mHashMultiMap.Add(ref.first, std::move(ref.second));
221 : mHashMultiMap(right.mHashMultiMap)
226 : mHashMultiMap(right.mHashMultiMap, MemManager(alloc))
245 mHashMultiMap = HashMultiMap(values, mHashMultiMap.GetHashTraits(), MemManager(
get_allocator()));
261 return mHashMultiMap;
266 return mHashMultiMap;
304 return mHashMultiMap.GetHashTraits().GetHasher();
309 return mHashMultiMap.GetHashTraits().GetEqualComparer();
314 return allocator_type(mHashMultiMap.GetMemManager().GetByteAllocator());
319 return std::allocator_traits<allocator_type>::max_size(
get_allocator());
324 return mHashMultiMap.GetCount();
329 return mHashMultiMap.IsEmpty();
334 mHashMultiMap.Clear();
350 template<
typename KeyArg>
357 template<
typename KeyArg>
367 return !!keyIter ? keyIter->GetCount() : 0;
370 template<
typename KeyArg>
375 return !!keyIter ? keyIter->GetCount() : 0;
380 return count(key) > 0;
383 template<
typename KeyArg>
387 return count(key) > 0;
392 return pvEqualRange<const_iterator>(mHashMultiMap, mHashMultiMap.Find(key));
397 return pvEqualRange<iterator>(mHashMultiMap, mHashMultiMap.Find(key));
400 template<
typename KeyArg>
402 std::pair<const_iterator, const_iterator>>
equal_range(
const KeyArg& key)
const
404 return pvEqualRange<const_iterator>(mHashMultiMap, mHashMultiMap.Find(key));
407 template<
typename KeyArg>
411 return pvEqualRange<iterator>(mHashMultiMap, mHashMultiMap.Find(key));
414 template<
typename ValueArg = std::pair<key_type, mapped_type>>
418 return emplace(std::forward<ValueArg>(valueArg));
421 template<
typename ValueArg = std::pair<key_type, mapped_type>>
425 return insert(std::forward<ValueArg>(valueArg));
428 template<
typename Iterator>
429 void insert(Iterator first, Iterator last)
431 pvInsertRange(first, last);
434 void insert(std::initializer_list<value_type> values)
436 mHashMultiMap.Add(values.begin(), values.end());
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)
444 pvInsertRange(std::ranges::begin(values), std::ranges::end(values));
446 #endif // MOMO_HAS_CONTAINERS_RANGES
450 return pvEmplace(std::tuple<>(), std::tuple<>());
458 template<
typename ValueArg>
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))));
465 template<
typename ValueArg>
468 return emplace(std::forward<ValueArg>(valueArg));
471 template<
typename KeyArg,
typename MappedArg>
474 return pvEmplace(std::forward_as_tuple(std::forward<KeyArg>(keyArg)),
475 std::forward_as_tuple(std::forward<MappedArg>(mappedArg)));
478 template<
typename KeyArg,
typename MappedArg>
481 return emplace(std::forward<KeyArg>(keyArg), std::forward<MappedArg>(mappedArg));
484 template<
typename... KeyArgs,
typename... MappedArgs>
486 std::tuple<KeyArgs...> keyArgs, std::tuple<MappedArgs...> mappedArgs)
488 return pvEmplace(std::move(keyArgs), std::move(mappedArgs));
491 template<
typename... KeyArgs,
typename... MappedArgs>
493 std::tuple<KeyArgs...> keyArgs, std::tuple<MappedArgs...> mappedArgs)
495 return pvEmplace(std::move(keyArgs), std::move(mappedArgs));
503 ? mHashMultiMap.Remove(iter)
504 : mHashMultiMap.MakeIterator(mHashMultiMap.RemoveKey(keyIter)));
514 if (first ==
begin() && last ==
end())
522 ConstIteratorProxy::GetBaseIterator(first)));
526 if (std::next(first) == last)
529 ConstIteratorProxy::GetBaseIterator(first).GetKeyIterator();
531 mHashMultiMap.MakeIterator(keyIter, keyIter->GetCount())))
534 mHashMultiMap.MakeIterator(mHashMultiMap.RemoveKey(keyIter)));
537 MOMO_THROW(std::invalid_argument(
"invalid unordered_multimap erase arguments"));
542 return mHashMultiMap.RemoveKey(key);
545 template<
typename ValueFilter>
550 return cont.mHashMultiMap.Remove(pairFilter);
574 if (left.mHashMultiMap.GetKeyCount() != right.mHashMultiMap.GetKeyCount())
576 if (left.mHashMultiMap.GetCount() != right.mHashMultiMap.GetCount())
579 for (
typename ConstKeyIterator::Reference ref : left.mHashMultiMap.GetKeyBounds())
581 if (ref.GetCount() == 0)
583 ConstKeyIterator rightKeyIter = right.mHashMultiMap.Find(ref.key);
586 if (ref.GetCount() != rightKeyIter->GetCount())
588 if (!std::is_permutation(ref.GetBegin(), ref.GetEnd(), rightKeyIter->GetBegin()))
597 return !(left == right);
601 template<
typename Iterator,
typename HashMultiMap,
typename KeyIterator>
602 static std::pair<Iterator, Iterator> pvEqualRange(
HashMultiMap& hashMultiMap,
608 size_t count = keyIter->GetCount();
615 return { first, last };
618 template<
typename... KeyArgs,
typename... MappedArgs>
619 iterator pvEmplace(std::tuple<KeyArgs...>&& keyArgs, std::tuple<MappedArgs...>&& mappedArgs)
621 typedef typename HashMultiMap::KeyValueTraits
622 ::template ValueCreator<MappedArgs...> MappedCreator;
623 return pvInsert(std::move(keyArgs),
624 MappedCreator(mHashMultiMap.GetMemManager(), std::move(mappedArgs)));
627 template<
typename... KeyArgs,
typename MappedCreator>
628 iterator pvInsert(std::tuple<KeyArgs...>&& keyArgs, MappedCreator&& mappedCreator)
630 MemManager& memManager = mHashMultiMap.GetMemManager();
633 typedef typename KeyManager::template Creator<KeyArgs...> KeyCreator;
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));
641 template<
typename RKey,
typename MappedCreator,
642 typename Key =
typename std::decay<RKey>::type>
644 iterator> pvInsert(std::tuple<RKey>&& key, MappedCreator&& mappedCreator)
647 std::forward<RKey>(std::get<0>(key)), std::forward<MappedCreator>(mappedCreator)));
650 template<
typename Iterator,
typename Sentinel>
652 void> pvInsertRange(Iterator
begin, Sentinel
end)
654 mHashMultiMap.Add(std::move(
begin), std::move(
end));
657 template<
typename Iterator,
typename Sentinel>
659 void> pvInsertRange(Iterator
begin, Sentinel
end)
661 for (Iterator iter = std::move(
begin); iter !=
end; ++iter)
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>>>
703 HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketDefault>, MemManagerStd<TAllocator>>>
711 using UnorderedMultiMapAdaptor::UnorderedMultiMapAdaptor;
714 std::initializer_list<typename UnorderedMultiMapAdaptor::value_type> values)
735 template<
typename TKey,
typename TMapped,
737 typename TEqualComparer = std::equal_to<TKey>,
738 typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>>
740 HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketOpenDefault>, MemManagerStd<TAllocator>>>
748 using UnorderedMultiMapAdaptor::UnorderedMultiMapAdaptor;
751 std::initializer_list<typename UnorderedMultiMapAdaptor::value_type> values)
763 #ifdef MOMO_HAS_DEDUCTION_GUIDES
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>;
824 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap)
825 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_multimap_open)
827 #undef MOMO_DECLARE_DEDUCTION_GUIDES
829 #ifdef MOMO_HAS_CONTAINERS_RANGES
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>;
863 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap)
864 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_multimap_open)
866 #undef MOMO_DECLARE_DEDUCTION_GUIDES_RANGES
868 #endif // MOMO_HAS_CONTAINERS_RANGES
870 #endif // MOMO_HAS_DEDUCTION_GUIDES
876 #endif // MOMO_INCLUDE_GUARD_STDISH_UNORDERED_MULTIMAP
friend void swap(unordered_multimap &left, unordered_multimap &right) noexcept
Definition: unordered_multimap.h:720
Definition: ObjectManager.h:394
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
Definition: HashMultiMap.h:177
ptrdiff_t difference_type
Definition: unordered_multimap.h:47
#define MOMO_DECLARE_PROXY_FUNCTION(Class, Func)
Definition: Utility.h:116
TReference< typename BaseIterator::Reference > Reference
Definition: IteratorUtility.h:340
iterator end() noexcept
Definition: unordered_multimap.h:284
#define MOMO_THROW(exception)
Definition: UserSettings.h:191
void swap(unordered_multimap_adaptor &right) noexcept
Definition: unordered_multimap.h:249
unordered_multimap_adaptor(const allocator_type &alloc)
Definition: unordered_multimap.h:87
iterator::ConstIterator const_iterator
Definition: unordered_multimap.h:55
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< iterator, iterator > > equal_range(const KeyArg &key)
Definition: unordered_multimap.h:409
unordered_multimap_adaptor()
Definition: unordered_multimap.h:83
size_type size() const noexcept
Definition: unordered_multimap.h:322
iterator emplace(KeyArg &&keyArg, MappedArg &&mappedArg)
Definition: unordered_multimap.h:472
unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:117
MOMO_FORCEINLINE std::pair< const_iterator, const_iterator > equal_range(const key_type &key) const
Definition: unordered_multimap.h:390
const_iterator end() const noexcept
Definition: unordered_multimap.h:279
iterator begin() noexcept
Definition: unordered_multimap.h:274
unordered_multimap_adaptor & operator=(unordered_multimap_adaptor &&right) noexcept(momo::internal::ContainerAssignerStd::IsNothrowMoveAssignable< unordered_multimap_adaptor >::value)
Definition: unordered_multimap.h:232
unordered_multimap_adaptor(const unordered_multimap_adaptor &right, const allocator_type &alloc)
Definition: unordered_multimap.h:225
HashTraits::EqualComparer key_equal
Definition: unordered_multimap.h:42
iterator emplace()
Definition: unordered_multimap.h:448
unordered_multimap & operator=(std::initializer_list< typename UnorderedMultiMapAdaptor::value_type > values)
Definition: unordered_multimap.h:713
const_iterator::Reference const_reference
Definition: unordered_multimap.h:58
KeyValueTraits::Value Value
Definition: HashMultiMap.h:565
iterator erase(const_iterator first, const_iterator last)
Definition: unordered_multimap.h:512
unordered_multimap_adaptor(std::initializer_list< value_type > values, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:145
KeyValueTraits::MemManager MemManager
Definition: HashMultiMap.h:566
momo::stdish::unordered_multimap is similar to std::unordered_multimap, but much more efficient in me...
Definition: unordered_multimap.h:704
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > find(const KeyArg &key) const
Definition: unordered_multimap.h:352
Definition: Utility.h:238
friend bool operator==(const unordered_multimap_adaptor &left, const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:571
nested_container_type & get_nested_container() noexcept
Definition: unordered_multimap.h:264
unordered_multimap_adaptor(size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:104
unordered_multimap_open & operator=(std::initializer_list< typename UnorderedMultiMapAdaptor::value_type > values)
Definition: unordered_multimap.h:750
momo::internal::EnableIf< std::is_constructible< value_type, ValueArg && >::value, iterator > insert(ValueArg &&valueArg)
Definition: unordered_multimap.h:416
KeyIterator GetKeyIterator() const noexcept
Definition: HashMultiMap.h:244
iterator::Reference reference
Definition: unordered_multimap.h:57
const nested_container_type & get_nested_container() const noexcept
Definition: unordered_multimap.h:259
MemManagerStd uses allocator<unsigned char>::allocate and deallocate
Definition: MemManager.h:179
HashTraits::Hasher hasher
Definition: unordered_multimap.h:41
momo::internal::HashDerivedIterator< typename HashMultiMap::Iterator, momo::internal::MapReferenceStd > iterator
Definition: unordered_multimap.h:54
MOMO_FORCEINLINE std::pair< iterator, iterator > equal_range(const key_type &key)
Definition: unordered_multimap.h:395
unordered_multimap_adaptor(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:125
HashMultiMap::Value mapped_type
Definition: unordered_multimap.h:40
unordered_multimap_adaptor & operator=(const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:238
static Container & Move(Container &&srcCont, Container &dstCont) noexcept(IsNothrowMoveAssignable< Container >::value)
Definition: Utility.h:515
key_equal key_eq() const
Definition: unordered_multimap.h:307
hasher hash_function() const
Definition: unordered_multimap.h:302
std::allocator_traits< typename MemManager::ByteAllocator >::template rebind_alloc< value_type > allocator_type
Definition: unordered_multimap.h:51
MOMO_NODISCARD bool empty() const noexcept
Definition: unordered_multimap.h:327
size_t size_type
Definition: unordered_multimap.h:46
typename std::enable_if< value, Type >::type EnableIf
Definition: Utility.h:199
momo::stdish::unordered_multimap_open is similar to std::unordered_multimap, but much more efficient ...
Definition: unordered_multimap.h:741
friend void swap(unordered_multimap_open &left, unordered_multimap_open &right) noexcept
Definition: unordered_multimap.h:757
iterator erase(iterator where)
Definition: unordered_multimap.h:507
BoolConstant< std::is_empty< Allocator >::value||std::allocator_traits< Allocator >::propagate_on_container_move_assignment::value > IsNothrowMoveAssignable
Definition: Utility.h:511
size_type max_size() const noexcept
Definition: unordered_multimap.h:317
iterator emplace_hint(const_iterator, std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs)
Definition: unordered_multimap.h:492
unordered_multimap_adaptor(unordered_multimap_adaptor &&right)
Definition: unordered_multimap.h:200
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
const_iterator cbegin() const noexcept
Definition: unordered_multimap.h:289
size_type erase(const key_type &key)
Definition: unordered_multimap.h:540
Definition: IteratorUtility.h:228
const_iterator::Pointer const_pointer
Definition: unordered_multimap.h:61
unordered_multimap_adaptor(unordered_multimap_adaptor &&right, const allocator_type &alloc)
Definition: unordered_multimap.h:205
friend void swap(unordered_multimap_adaptor &left, unordered_multimap_adaptor &right) noexcept
Definition: unordered_multimap.h:254
unordered_multimap_adaptor(const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:220
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > contains(const KeyArg &key) const
Definition: unordered_multimap.h:385
KeyValueTraits::Key Key
Definition: HashMultiMap.h:564
unordered_multimap_adaptor(Iterator first, Iterator last)
Definition: unordered_multimap.h:111
iterator::Pointer pointer
Definition: unordered_multimap.h:60
MOMO_FORCEINLINE bool contains(const key_type &key) const
Definition: unordered_multimap.h:378
HashMultiMap::Key key_type
Definition: unordered_multimap.h:39
momo::internal::EnableIf< std::is_constructible< value_type, ValueArg && >::value, iterator > insert(const_iterator, ValueArg &&valueArg)
Definition: unordered_multimap.h:423
Definition: HashTraits.h:196
Definition: IteratorUtility.h:335
iterator emplace_hint(const_iterator, ValueArg &&valueArg)
Definition: unordered_multimap.h:466
internal::HashMultiMapIterator< KeyIterator, Settings > Iterator
Definition: HashMultiMap.h:672
Definition: ObjectManager.h:190
iterator emplace_hint(const_iterator, KeyArg &&keyArg, MappedArg &&mappedArg)
Definition: unordered_multimap.h:479
void clear() noexcept
Definition: unordered_multimap.h:332
#define MOMO_FORCEINLINE
Definition: UserSettings.h:125
Definition: unordered_multimap.h:32
HashMultiMapCore< HashMultiMapKeyValueTraits< TKey, TValue, TMemManager >, THashTraits > HashMultiMap
Definition: HashMultiMap.h:1221
~unordered_multimap_adaptor()=default
unordered_multimap_adaptor(size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:98
void insert(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:434
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_FORCEINLINE size_type count(const key_type &key) const
Definition: unordered_multimap.h:364
unordered_multimap_adaptor(size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_multimap.h:92
const_iterator begin() const noexcept
Definition: unordered_multimap.h:269
Definition: HashMultiMap.h:559
MOMO_FORCEINLINE iterator find(const key_type &key)
Definition: unordered_multimap.h:345
unordered_multimap_adaptor(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:140
iterator emplace(std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs)
Definition: unordered_multimap.h:485
static Container & Copy(const Container &srcCont, Container &dstCont)
Definition: Utility.h:531
HashMultiMap nested_container_type
Definition: unordered_multimap.h:44
void insert(Iterator first, Iterator last)
Definition: unordered_multimap.h:429
iterator emplace_hint(const_iterator)
Definition: unordered_multimap.h:453
MOMO_FORCEINLINE const_iterator find(const key_type &key) const
Definition: unordered_multimap.h:340
std::pair< const key_type, mapped_type > value_type
Definition: unordered_multimap.h:49
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > count(const KeyArg &key) const
Definition: unordered_multimap.h:372
static void Swap(Container &cont1, Container &cont2) noexcept
Definition: Utility.h:546
friend size_type erase_if(unordered_multimap_adaptor &cont, const ValueFilter &valueFilter)
Definition: unordered_multimap.h:546
friend bool operator!=(const unordered_multimap_adaptor &left, const unordered_multimap_adaptor &right)
Definition: unordered_multimap.h:594
const_iterator cend() const noexcept
Definition: unordered_multimap.h:294
allocator_type get_allocator() const noexcept
Definition: unordered_multimap.h:312
iterator emplace(ValueArg &&valueArg)
Definition: unordered_multimap.h:459
iterator erase(const_iterator where)
Definition: unordered_multimap.h:498
ConstIterator MakeIterator(ConstKeyIterator keyIter, size_t valueIndex=0) const
Definition: HashMultiMap.h:1096
#define MOMO_NODISCARD
Definition: UserSettings.h:262
ConstIterator GetEnd() const noexcept
Definition: HashMultiMap.h:793
THashTraits HashTraits
Definition: HashMultiMap.h:562
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, iterator > find(const KeyArg &key)
Definition: unordered_multimap.h:359
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
Definition: MapUtility.h:68
unordered_multimap_adaptor & operator=(std::initializer_list< value_type > values)
Definition: unordered_multimap.h:243