EqualTo

template<typename TValueType, typename TSfinae = void>
struct libsemigroups::EqualTo

Adapter for testing equality.

Defined in adapters.hpp.

This type should be a stateless trivially default constructible with a call operator of signature bool operator()(TValueType const&, TValueType const&) (possibly noexcept, inline and/or constexpr also) for use with, for example, std::unordered_map.

Used by:

Template Parameters
  • TValueType – the type of objects to compare.

  • TSfinae – this template parameter can be used for SFINAE.

Public Functions

inline bool operator()(TValueType const &x, TValueType const &y) const

This call operator compares x and y using std::equal_to with template parameter TValueType.

Parameters
  • x – const reference to TValueType to compare with y.

  • y – const reference to TValueType to compare with x.

Returns

A bool.