EqualityComparerHashAdapter

EqualityComparerHashAdapter struct

Adapter to use IEqualityComparer for hashing. Uses comparator object, if set; otherwise, uses available hash method selected using DictionaryHashSelector struct.

template<typename T>class EqualityComparerHashAdapter

Template parameters

ParameterDescription
Hashedtype.

Methods

MethodDescription
EqualityComparerHashAdapter()Creates adapter with no comparator to use.
EqualityComparerHashAdapter(const SharedPtr<IEqualityComparer<T>>&)Creates adapter with given comparator to use.
std::size_t operator()(const T&) constCalculates hash value.
void set_EqualityComparator(const SharedPtr<IEqualityComparer<T>>&)Sets comparator to use.

See Also