ShortLexCompare

template<typename T>
struct ShortLexCompare

Defined in order.hpp.

A stateless struct with binary call operator using shortlex_compare.

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

See

shortlex_compare(T const, T const, S const, S const)

Template Parameters
  • T: the type of the objects to be compared.

Public Functions

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

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

Return

A bool.

Exceptions

See shortlex_compare(T const, T const, S const, S const)

Complexity

See shortlex_compare(T const, T const, S const, S const)

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

  • y: const reference to the second object for comparison