Go to the documentation of this file.
18 #ifndef MOMO_INCLUDE_GUARD_STDISH_UNORDERED_SET
19 #define MOMO_INCLUDE_GUARD_STDISH_UNORDERED_SET
22 #include MOMO_PARENT_HEADER(HashSet)
30 template<
typename THashSet>
34 typedef THashSet HashSet;
40 typedef typename HashTraits::Hasher
hasher;
41 typedef typename HashTraits::EqualComparer
key_equal;
49 typedef typename std::allocator_traits<typename MemManager::ByteAllocator>
72 template<
typename KeyArg>
73 struct IsValidKeyArg :
public HashTraits::template IsValidKeyArg<KeyArg>
89 : mHashSet(HashTraits(), MemManager(alloc))
94 : mHashSet(HashTraits(bucketCount), MemManager(alloc))
100 : mHashSet(HashTraits(bucketCount, hashFunc), MemManager(alloc))
106 : mHashSet(HashTraits(bucketCount, hashFunc, equalComp), MemManager(alloc))
110 template<
typename Iterator>
116 template<
typename Iterator>
124 template<
typename Iterator>
132 template<
typename Iterator>
147 : mHashSet(values, HashTraits(bucketCount), MemManager(alloc))
153 : mHashSet(values, HashTraits(bucketCount, hashFunc), MemManager(alloc))
159 : mHashSet(values, HashTraits(bucketCount, hashFunc, equalComp), MemManager(alloc))
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>
195 insert_range(std::forward<Range>(values));
197 #endif // MOMO_HAS_CONTAINERS_RANGES
205 : mHashSet(right.mHashSet.GetHashTraits(), MemManager(alloc))
207 if (right.get_allocator() == alloc)
209 mHashSet.Swap(right.mHashSet);
213 mHashSet.MergeFrom(right.mHashSet);
219 : mHashSet(right.mHashSet)
224 : mHashSet(right.mHashSet, MemManager(alloc))
243 mHashSet = HashSet(values, mHashSet.GetHashTraits(), MemManager(
get_allocator()));
269 return mHashSet.GetBegin();
276 return mHashSet.GetEnd();
301 MOMO_THROW(std::out_of_range(
"invalid load factor"));
302 HashTraits hashTraits(mHashSet.GetHashTraits(), maxLoadFactor);
304 hashSet.Reserve(
size());
306 mHashSet = std::move(hashSet);
311 return mHashSet.GetHashTraits().GetHasher();
316 return mHashSet.GetHashTraits().GetEqualComparer();
321 return allocator_type(mHashSet.GetMemManager().GetByteAllocator());
326 return std::allocator_traits<allocator_type>::max_size(
get_allocator());
331 return mHashSet.GetCount();
336 return mHashSet.IsEmpty();
348 bucketCount =
size_t{1} << logBucketCount;
354 mHashSet.Reserve(
count);
359 return mHashSet.Find(key);
364 template<
typename KeyArg>
368 return mHashSet.Find(key);
380 template<
typename KeyArg>
389 return mHashSet.ContainsKey(key);
392 template<
typename KeyArg>
396 return mHashSet.ContainsKey(key);
407 template<
typename KeyArg>
409 std::pair<const_iterator, const_iterator>>
equal_range(
const KeyArg& key)
const
427 return mHashSet.Add(hint, std::move(value));
429 return insert(std::move(value)).first;
441 return mHashSet.Add(hint, value);
443 return insert(value).first;
451 std::move(NodeTypeProxy::GetExtractedItem(node)));
461 return mHashSet.Add(hint, std::move(NodeTypeProxy::GetExtractedItem(node)));
465 return insert(std::move(node)).position;
469 template<
typename Iterator>
470 void insert(Iterator first, Iterator last)
472 pvInsertRange(first, last);
475 void insert(std::initializer_list<value_type> values)
477 mHashSet.Insert(values);
480 #ifdef MOMO_HAS_CONTAINERS_RANGES
481 template<std::ranges::input_range Range>
482 requires std::convertible_to<std::ranges::range_reference_t<Range>,
value_type>
483 void insert_range(Range&& values)
485 pvInsertRange(std::ranges::begin(values), std::ranges::end(values));
487 #endif // MOMO_HAS_CONTAINERS_RANGES
489 template<
typename... ValueArgs>
490 std::pair<iterator, bool>
emplace(ValueArgs&&... valueArgs)
492 MemManager& memManager = mHashSet.GetMemManager();
494 typedef typename HashSet::ItemTraits::template Creator<ValueArgs...> ValueCreator;
495 extItem.
Create(ValueCreator(memManager, std::forward<ValueArgs>(valueArgs)...));
500 template<
typename ValueArg>
502 std::pair<iterator, bool>>
emplace(ValueArg&& valueArg)
505 static_cast<const key_type&
>(valueArg), std::forward<ValueArg>(valueArg));
509 template<
typename... ValueArgs>
513 return mHashSet.AddVar(hint, std::forward<ValueArgs>(valueArgs)...);
515 return emplace(std::forward<ValueArgs>(valueArgs)...).first;
520 return mHashSet.Remove(where);
527 if (first ==
begin() && last ==
end())
534 if (first !=
end() && std::next(first) == last)
536 MOMO_THROW(std::invalid_argument(
"invalid unordered_set erase arguments"));
541 return mHashSet.Remove(key) ? 1 : 0;
544 template<
typename ValueFilter>
547 return cont.mHashSet.Remove(valueFilter);
561 template<
typename Set>
575 return mHashSet.GetBucketCount();
580 return mHashSet.GetBucketBounds(bucketIndex).GetCount();
585 return mHashSet.GetBucketBounds(bucketIndex).GetBegin();
590 return mHashSet.GetBucketBounds(bucketIndex).GetBegin();
595 return mHashSet.GetBucketBounds(bucketIndex).GetEnd();
600 return mHashSet.GetBucketBounds(bucketIndex).GetEnd();
605 return begin(bucketIndex);
610 return end(bucketIndex);
615 return mHashSet.GetBucketIndex(key);
622 if (
count == 0 && bucketCount == 0)
624 return static_cast<float>(
count) /
static_cast<float>(bucketCount);
633 if (right.
find(ref) == right.
end())
641 return !(left == right);
645 template<
typename Iterator,
typename Sentinel>
647 void> pvInsertRange(Iterator
begin, Sentinel
end)
649 mHashSet.Insert(std::move(
begin), std::move(
end));
652 template<
typename Iterator,
typename Sentinel>
654 void> pvInsertRange(Iterator
begin, Sentinel
end)
656 for (Iterator iter = std::move(
begin); iter !=
end; ++iter)
686 template<
typename TKey,
687 typename THasher = HashCoder<TKey>,
688 typename TEqualComparer = std::equal_to<TKey>,
689 typename TAllocator = std::allocator<TKey>>
691 HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketDefault>, MemManagerStd<TAllocator>>>
699 using UnorderedSetAdaptor::UnorderedSetAdaptor;
722 template<
typename TKey,
724 typename TEqualComparer = std::equal_to<TKey>,
725 typename TAllocator = std::allocator<TKey>>
727 HashTraitsStd<TKey, THasher, TEqualComparer, HashBucketOpenDefault>, MemManagerStd<TAllocator>>>
735 using UnorderedSetAdaptor::UnorderedSetAdaptor;
749 #ifdef MOMO_HAS_DEDUCTION_GUIDES
751 #define MOMO_DECLARE_DEDUCTION_GUIDES(unordered_set) \
752 template<typename Iterator, \
753 typename Key = typename std::iterator_traits<Iterator>::value_type> \
754 unordered_set(Iterator, Iterator) \
755 -> unordered_set<Key>; \
756 template<typename Iterator, \
757 typename Key = typename std::iterator_traits<Iterator>::value_type, \
758 typename Allocator = std::allocator<Key>, \
759 typename = internal::hash_checker<Key, Allocator, HashCoder<Key>>> \
760 unordered_set(Iterator, Iterator, size_t, Allocator = Allocator()) \
761 -> unordered_set<Key, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
762 template<typename Iterator, typename Hasher, \
763 typename Key = typename std::iterator_traits<Iterator>::value_type, \
764 typename Allocator = std::allocator<Key>, \
765 typename = internal::hash_checker<Key, Allocator, Hasher>> \
766 unordered_set(Iterator, Iterator, size_t, Hasher, Allocator = Allocator()) \
767 -> unordered_set<Key, Hasher, std::equal_to<Key>, Allocator>; \
768 template<typename Iterator, typename Hasher, typename EqualComparer, \
769 typename Key = typename std::iterator_traits<Iterator>::value_type, \
770 typename Allocator = std::allocator<Key>, \
771 typename = internal::hash_checker<Key, Allocator, Hasher, EqualComparer>> \
772 unordered_set(Iterator, Iterator, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
773 -> unordered_set<Key, Hasher, EqualComparer, Allocator>; \
774 template<typename Key> \
775 unordered_set(std::initializer_list<Key>) \
776 -> unordered_set<Key>; \
777 template<typename Key, \
778 typename Allocator = std::allocator<Key>, \
779 typename = internal::hash_checker<Key, Allocator, HashCoder<Key>>> \
780 unordered_set(std::initializer_list<Key>, size_t, Allocator = Allocator()) \
781 -> unordered_set<Key, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
782 template<typename Key, typename Hasher, \
783 typename Allocator = std::allocator<Key>, \
784 typename = internal::hash_checker<Key, Allocator, Hasher>> \
785 unordered_set(std::initializer_list<Key>, size_t, Hasher, Allocator = Allocator()) \
786 -> unordered_set<Key, Hasher, std::equal_to<Key>, Allocator>; \
787 template<typename Key, typename Hasher, typename EqualComparer, \
788 typename Allocator = std::allocator<Key>, \
789 typename = internal::hash_checker<Key, Allocator, Hasher, EqualComparer>> \
790 unordered_set(std::initializer_list<Key>, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
791 -> unordered_set<Key, Hasher, EqualComparer, Allocator>; \
792 template<typename Key, typename Hasher, typename EqualComparer, typename Allocator> \
793 unordered_set(unordered_set<Key, Hasher, EqualComparer, Allocator>, momo::internal::Identity<Allocator>) \
794 -> unordered_set<Key, Hasher, EqualComparer, Allocator>;
796 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_set)
797 MOMO_DECLARE_DEDUCTION_GUIDES(unordered_set_open)
799 #undef MOMO_DECLARE_DEDUCTION_GUIDES
801 #ifdef MOMO_HAS_CONTAINERS_RANGES
803 #define MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_set) \
804 template<std::ranges::input_range Range, \
805 typename Key = std::ranges::range_value_t<Range>> \
806 unordered_set(std::from_range_t, Range&&) \
807 -> unordered_set<Key>; \
808 template<std::ranges::input_range Range, \
809 typename Key = std::ranges::range_value_t<Range>, \
810 typename Allocator = std::allocator<Key>, \
811 typename = internal::hash_checker<Key, Allocator, HashCoder<Key>>> \
812 unordered_set(std::from_range_t, Range&&, size_t, Allocator = Allocator()) \
813 -> unordered_set<Key, HashCoder<Key>, std::equal_to<Key>, Allocator>; \
814 template<std::ranges::input_range Range, typename Hasher, \
815 typename Key = std::ranges::range_value_t<Range>, \
816 typename Allocator = std::allocator<Key>, \
817 typename = internal::hash_checker<Key, Allocator, Hasher>> \
818 unordered_set(std::from_range_t, Range&&, size_t, Hasher, Allocator = Allocator()) \
819 -> unordered_set<Key, Hasher, std::equal_to<Key>, Allocator>; \
820 template<std::ranges::input_range Range, typename Hasher, typename EqualComparer, \
821 typename Key = std::ranges::range_value_t<Range>, \
822 typename Allocator = std::allocator<Key>, \
823 typename = internal::hash_checker<Key, Allocator, Hasher, EqualComparer>> \
824 unordered_set(std::from_range_t, Range&&, size_t, Hasher, EqualComparer, Allocator = Allocator()) \
825 -> unordered_set<Key, Hasher, EqualComparer, Allocator>;
827 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_set)
828 MOMO_DECLARE_DEDUCTION_GUIDES_RANGES(unordered_set_open)
830 #undef MOMO_DECLARE_DEDUCTION_GUIDES_RANGES
832 #endif // MOMO_HAS_CONTAINERS_RANGES
834 #endif // MOMO_HAS_DEDUCTION_GUIDES
840 #endif // MOMO_INCLUDE_GUARD_STDISH_UNORDERED_SET
iterator erase(const_iterator first, const_iterator last)
Definition: unordered_set.h:525
Definition: unordered_set.h:32
const_iterator::Pointer const_pointer
Definition: unordered_set.h:61
unordered_set_adaptor(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:125
unordered_set_adaptor()
Definition: unordered_set.h:84
Position position
Definition: IteratorUtility.h:132
unordered_set_adaptor(Iterator first, Iterator last, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:117
void max_load_factor(float maxLoadFactor)
Definition: unordered_set.h:296
internal::set_node_handle< typename HashSet::ExtractedItem > node_type
Definition: unordered_set.h:65
static const size_t maxSize
Definition: Utility.h:476
iterator emplace_hint(const_iterator hint, ValueArgs &&... valueArgs)
Definition: unordered_set.h:510
const_iterator begin() const noexcept
Definition: unordered_set.h:267
internal::insert_return_type< iterator, node_type > insert_return_type
Definition: unordered_set.h:66
std::pair< iterator, bool > insert(value_type &&value)
Definition: unordered_set.h:418
size_type erase(const key_type &key)
Definition: unordered_set.h:539
#define MOMO_DECLARE_PROXY_FUNCTION(Class, Func)
Definition: Utility.h:116
#define MOMO_THROW(exception)
Definition: UserSettings.h:191
HashSet::Key key_type
Definition: unordered_set.h:39
static constexpr UInt Max(UInt value1, UInt value2) noexcept
Definition: Utility.h:352
unordered_set_adaptor(unordered_set_adaptor &&right)
Definition: unordered_set.h:199
HashSet::ConstBucketBounds::Iterator const_local_iterator
Definition: unordered_set.h:68
void reserve(size_type count)
Definition: unordered_set.h:352
iterator insert(const_iterator hint, node_type &&node)
Definition: unordered_set.h:455
friend size_type erase_if(unordered_set_adaptor &cont, const ValueFilter &valueFilter)
Definition: unordered_set.h:545
Definition: set_map_utility.h:202
const Item * Pointer
Definition: HashSet.h:211
nested_container_type & get_nested_container() noexcept
Definition: unordered_set.h:262
size_type max_bucket_count() const noexcept
Definition: unordered_set.h:567
unordered_set_adaptor(std::initializer_list< value_type > values, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:151
unordered_set_adaptor & operator=(unordered_set_adaptor &&right) noexcept(momo::internal::ContainerAssignerStd::IsNothrowMoveAssignable< unordered_set_adaptor >::value)
Definition: unordered_set.h:230
static UInt Log2(UInt value) noexcept
Definition: Utility.h:414
unordered_set_adaptor(std::initializer_list< value_type > values)
Definition: unordered_set.h:140
std::allocator_traits< typename MemManager::ByteAllocator >::template rebind_alloc< value_type > allocator_type
Definition: unordered_set.h:50
unordered_set_adaptor(size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:93
MOMO_NODISCARD bool empty() const noexcept
Definition: unordered_set.h:334
node_type extract(const key_type &key)
Definition: unordered_set.h:555
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< const_iterator, const_iterator > > equal_range(const KeyArg &key) const
Definition: unordered_set.h:409
const Item & Reference
Definition: HashSet.h:210
momo::stdish::set is similar to std::set, but much more efficient in memory usage....
Definition: set.h:690
unordered_set_adaptor(size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:104
MemManagerStd uses allocator<unsigned char>::allocate and deallocate
Definition: MemManager.h:179
value_type & reference
Definition: unordered_set.h:56
unordered_set_adaptor(Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:133
local_iterator begin(size_type bucketIndex)
Definition: unordered_set.h:583
MOMO_FORCEINLINE bool contains(const key_type &key) const
Definition: unordered_set.h:387
const_iterator cend() const noexcept
Definition: unordered_set.h:286
const_local_iterator cend(size_type bucketIndex) const
Definition: unordered_set.h:608
~unordered_set_adaptor()=default
allocator_type get_allocator() const noexcept
Definition: unordered_set.h:319
static Container & Move(Container &&srcCont, Container &dstCont) noexcept(IsNothrowMoveAssignable< Container >::value)
Definition: Utility.h:515
Definition: IteratorUtility.h:100
Definition: HashSet.h:289
value_type * pointer
Definition: unordered_set.h:60
key_equal key_eq() const
Definition: unordered_set.h:314
std::pair< iterator, bool > insert(const value_type &value)
Definition: unordered_set.h:432
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > count(const KeyArg &key) const
Definition: unordered_set.h:382
unordered_set_adaptor(const allocator_type &alloc)
Definition: unordered_set.h:88
unordered_set_adaptor & operator=(std::initializer_list< value_type > values)
Definition: unordered_set.h:241
ItemTraits::MemManager MemManager
Definition: HashSet.h:481
ptrdiff_t difference_type
Definition: unordered_set.h:46
typename std::enable_if< value, Type >::type EnableIf
Definition: Utility.h:199
const nested_container_type & get_nested_container() const noexcept
Definition: unordered_set.h:257
iterator erase(const_iterator where)
Definition: unordered_set.h:518
friend bool operator!=(const unordered_set_adaptor &left, const unordered_set_adaptor &right)
Definition: unordered_set.h:639
const_iterator end() const noexcept
Definition: unordered_set.h:274
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > find(const KeyArg &key) const
Definition: unordered_set.h:366
size_type max_size() const noexcept
Definition: unordered_set.h:324
BoolConstant< std::is_empty< Allocator >::value||std::allocator_traits< Allocator >::propagate_on_container_move_assignment::value > IsNothrowMoveAssignable
Definition: Utility.h:511
local_iterator end(size_type bucketIndex)
Definition: unordered_set.h:593
float max_load_factor() const noexcept
Definition: unordered_set.h:291
iterator insert(const_iterator hint, value_type &&value)
Definition: unordered_set.h:424
unordered_set & operator=(std::initializer_list< typename UnorderedSetAdaptor::value_type > values)
Definition: unordered_set.h:701
bool inserted
Definition: IteratorUtility.h:135
unordered_set_adaptor(const unordered_set_adaptor &right, const allocator_type &alloc)
Definition: unordered_set.h:223
size_type size() const noexcept
Definition: unordered_set.h:329
iterator insert(const_iterator hint, const value_type &value)
Definition: unordered_set.h:438
MOMO_FORCEINLINE std::pair< const_iterator, const_iterator > equal_range(const key_type &key) const
Definition: unordered_set.h:399
MOMO_FORCEINLINE size_type count(const key_type &key) const
Definition: unordered_set.h:375
HashSet::Iterator iterator
Definition: unordered_set.h:53
Definition: HashSet.h:474
void insert(Iterator first, Iterator last)
Definition: unordered_set.h:470
friend bool operator==(const unordered_set_adaptor &left, const unordered_set_adaptor &right)
Definition: unordered_set.h:627
hasher hash_function() const
Definition: unordered_set.h:309
friend void swap(unordered_set_adaptor &left, unordered_set_adaptor &right) noexcept
Definition: unordered_set.h:252
const_local_iterator begin(size_type bucketIndex) const
Definition: unordered_set.h:588
momo::stdish::unordered_set_open is similar to std::unordered_set, but much more efficient in operati...
Definition: unordered_set.h:728
void merge(Set &&set)
Definition: unordered_set.h:562
node_type extract(const_iterator where)
Definition: unordered_set.h:550
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > contains(const KeyArg &key) const
Definition: unordered_set.h:394
unordered_set_adaptor(std::initializer_list< value_type > values, size_type bucketCount, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:145
Definition: HashTraits.h:196
std::pair< iterator, bool > emplace(ValueArgs &&... valueArgs)
Definition: unordered_set.h:490
momo::internal::EnableIf< std::is_same< key_type, typename std::decay< ValueArg >::type >::value, std::pair< iterator, bool > > emplace(ValueArg &&valueArg)
Definition: unordered_set.h:502
size_t size_type
Definition: unordered_set.h:45
const_local_iterator local_iterator
Definition: unordered_set.h:69
void insert(std::initializer_list< value_type > values)
Definition: unordered_set.h:475
HashTraits::Hasher hasher
Definition: unordered_set.h:40
key_type value_type
Definition: unordered_set.h:48
HashSet nested_container_type
Definition: unordered_set.h:43
size_type bucket_size(size_type bucketIndex) const
Definition: unordered_set.h:578
const_local_iterator cbegin(size_type bucketIndex) const
Definition: unordered_set.h:603
insert_return_type insert(node_type &&node)
Definition: unordered_set.h:446
ItemTraits::Key Key
Definition: HashSet.h:479
#define MOMO_CONSTEXPR_IF
Definition: UserSettings.h:228
size_type bucket(const key_type &key) const
Definition: unordered_set.h:613
unordered_set_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_set.h:157
#define MOMO_FORCEINLINE
Definition: UserSettings.h:125
THashTraits HashTraits
Definition: HashSet.h:477
void swap(unordered_set_adaptor &right) noexcept
Definition: unordered_set.h:247
void clear() noexcept
Definition: unordered_set.h:339
Definition: set_map_utility.h:42
const_iterator::Reference const_reference
Definition: unordered_set.h:57
unordered_set_open & operator=(std::initializer_list< typename UnorderedSetAdaptor::value_type > values)
Definition: unordered_set.h:737
unordered_set_adaptor(const unordered_set_adaptor &right)
Definition: unordered_set.h:218
static Container & Copy(const Container &srcCont, Container &dstCont)
Definition: Utility.h:531
HashSet::ConstIterator const_iterator
Definition: unordered_set.h:52
momo::stdish::unordered_set is similar to std::unordered_set, but much more efficient in memory usage...
Definition: unordered_set.h:692
unordered_set_adaptor(unordered_set_adaptor &&right, const allocator_type &alloc)
Definition: unordered_set.h:204
const_local_iterator end(size_type bucketIndex) const
Definition: unordered_set.h:598
void rehash(size_type bucketCount)
Definition: unordered_set.h:344
const nested_container_type & get_nested_container() const noexcept
Definition: set.h:203
unordered_set_adaptor(Iterator first, Iterator last)
Definition: unordered_set.h:111
friend void swap(unordered_set &left, unordered_set &right) noexcept
Definition: unordered_set.h:707
const_iterator cbegin() const noexcept
Definition: unordered_set.h:281
static const size_t bucketMaxItemCount
Definition: HashSet.h:512
static void Swap(Container &cont1, Container &cont2) noexcept
Definition: Utility.h:546
unordered_set_adaptor(size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type())
Definition: unordered_set.h:98
HashTraits::EqualComparer key_equal
Definition: unordered_set.h:41
size_type bucket_count() const noexcept
Definition: unordered_set.h:573
unordered_set_adaptor & operator=(const unordered_set_adaptor &right)
Definition: unordered_set.h:236
MOMO_FORCEINLINE const_iterator find(const key_type &key) const
Definition: unordered_set.h:357
#define MOMO_NODISCARD
Definition: UserSettings.h:262
float load_factor() const noexcept
Definition: unordered_set.h:618
friend void swap(unordered_set_open &left, unordered_set_open &right) noexcept
Definition: unordered_set.h:743