39 using KeyType =
typename inherited::KeyType;
40 using key_type =
typename inherited::key_type;
53 template <
typename KEY_EQUALS_COMPARER = equal_to<key_type>>
55 static_assert (not is_reference_v<KEY_EQUALS_COMPARER>);
56 constexpr ElementEqualsComparer (
const KeyExtractorType& keyExtractor = {},
const KEY_EQUALS_COMPARER& keyEqualsComparer = {})
57 : fKeyExtractor_{keyExtractor}
58 , fKeyComparer{keyEqualsComparer}
61 constexpr int operator() (
const value_type& lhs,
const KEY_TYPE& rhs)
const
63 return fKeyComparer (fKeyExtractor_ (lhs), rhs);
65 constexpr int operator() (
const KEY_TYPE& lhs,
const value_type& rhs)
const
67 return fKeyComparer (lhs, fKeyExtractor_ (rhs));
69 constexpr int operator() (
const value_type& lhs,
const value_type& rhs)
const
71 return fKeyComparer (fKeyExtractor_ (lhs), fKeyExtractor_ (rhs));
73 [[no_unique_address]]
const KeyExtractorType fKeyExtractor_;
74 [[no_unique_address]]
const KEY_EQUALS_COMPARER fKeyComparer;
75 using is_transparent = int;
88 template <
typename KEY_HASHER = std::hash<key_type>>
90 constexpr ElementHash (
const KeyExtractorType& keyExtractor = {},
const KEY_HASHER& kh = {})
91 : fKeyExtractor_{keyExtractor}
95 auto operator() (
const key_type& k)
const noexcept
97 return fKeyHasher (k);
99 auto operator() (
const value_type& v)
const noexcept
101 return fKeyHasher (fKeyExtractor_ (v));
103 [[no_unique_address]]
const KeyExtractorType fKeyExtractor_;
104 [[no_unique_address]]
const KEY_HASHER fKeyHasher;
106 using is_transparent = int;
118 template <
typename KEY_HASH = std::hash<key_type>,
typename KEY_EQUALS_COMPARER = std::equal_to<key_type>>
125 template <
typename KEY_HASH = std::hash<KEY_TYPE>,
typename KEY_EQUALS_COMPARER = equal_to<KEY_TYPE>>
127 KEY_EQUALS_COMPARER&& keyComparer = KEY_EQUALS_COMPARER{})
128 requires (IEqualsComparer<KEY_EQUALS_COMPARER, KEY_TYPE> and Cryptography::Digest::IHashFunction<KEY_HASH, KEY_TYPE>);
130 KeyedCollection_stdhashset (KeyedCollection_stdhashset&& src)
noexcept =
default;
131 KeyedCollection_stdhashset (
const KeyedCollection_stdhashset& src)
noexcept =
default;
136 nonvirtual KeyedCollection_stdhashset& operator= (KeyedCollection_stdhashset&& rhs)
noexcept =
default;
137 nonvirtual KeyedCollection_stdhashset& operator= (
const KeyedCollection_stdhashset& rhs) =
default;
140 using IImplRepBase_ =
typename KeyedCollection<T, KEY_TYPE, TRAITS>::_IRep;
141 template <
typename KEY_EXTRACTOR,
typename KEY_INORDER_COMPARER>
145 nonvirtual
void AssertRepValidType_ ()
const;