EqualityComparerAdapter

EqualityComparerAdapter struct

Adapter making it possible using IEqualityComparer with STL-styled collections and algorithms. Uses IEqualityComparer, if set. If not set, uses operator ==, Object::Equals or T::Equals, whichever is available.

template<class T>class EqualityComparerAdapter

Template parameters

ParameterDescription
TType being compared.

Methods

MethodDescription
EqualityComparerAdapter()Creates adapter not using any comparator.
EqualityComparerAdapter(const SharedPtr<IEqualityComparer<T>>&)Creates adapter with given comparator.
bool operator()(const T&, const T&) constCompares two objects.
void set_EqualityComparator(const SharedPtr<IEqualityComparer<T>>&)Sets comparator.

See Also