lexicographical_compare (references)

template<typename T>
bool libsemigroups::lexicographical_compare(T const &x, T const &y)

Compare two objects of the same type using std::lexicographical_compare.

Defined in order.hpp.

Possible Implementation

std::lexicographical_compare(
  x.cbegin(), x.cend(), y.cbegin(), y.cend());

Complexity

See std::lexicographical_compare.

Template Parameters

T – the type of the objects to be compared.

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

  • y – const reference to the second object for comparison

Throws

(None) – See std::lexicographical_compare.

Returns

A bool.