LexicographicalCompare

template<typename T>
struct libsemigroups::LexicographicalCompare

Defined in order.hpp.

A stateless struct with binary call operator using std::lexicographical_compare.

This only exists to be used as a template parameter, and has no advantages over using std::lexicographical_compare otherwise.

See

std::lexicographical_compare.

tparam T

the type of the objects to be compared.

Public Functions

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

Call operator that compares x and y using std::lexicographical_compare.

Exceptions

See std::lexicographical_compare.

Complexity

See std::lexicographical_compare.

Parameters
  • x – const reference to the first object for comparison

  • y – const reference to the second object for comparison

Returns

A bool.