libsemigroups  v3.3.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
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 also
std::lexicographical_compare.

Public Member Functions

template<typename Iterator>
bool operator() (Iterator first1, Iterator last1, Iterator first2, Iterator last2) const
 Call operator that compares iterators using std::lexicographical_compare.
 
template<typename T>
bool operator() (std::initializer_list< T > x, std::initializer_list< T > y) const
 Call operator that compares x and y given initializer lists using std::lexicographical_compare.
 
template<typename Thing>
bool operator() (Thing const &x, Thing const &y) const
 Call operator that compares x and y using std::lexicographical_compare.
 

Member Function Documentation

◆ operator()() [1/3]

template<typename Iterator>
bool operator() ( Iterator first1,
Iterator last1,
Iterator first2,
Iterator last2 ) const
inlinenodiscard

Call operator that compares iterators using std::lexicographical_compare.

Template Parameters
Iteratorthe type of the parameters.
Parameters
first1the start of the first object to compare.
last1one beyond the end of the first object to compare.
first2the start of the second object to compare.
last2one beyond the end of the second object to compare.
Returns
The boolean value true if the range [first1, last1) is lexicographically less than the range [first2, last2), and false otherwise.
Exceptions
See std::lexicographical_compare.
Complexity
See std::lexicographical_compare.

◆ operator()() [2/3]

template<typename T>
bool operator() ( std::initializer_list< T > x,
std::initializer_list< T > y ) const
inlinenodiscard

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

Template Parameters
Tthe items in the arguments.
Parameters
xinitializer list for the first object for comparison.
yinitializer list for the second object for comparison.
Returns
The boolean value true if x is lexicographically less than y, and false otherwise.
Exceptions
See std::lexicographical_compare.
Complexity
See std::lexicographical_compare.

◆ operator()() [3/3]

template<typename Thing>
bool operator() ( Thing const & x,
Thing const & y ) const
inlinenodiscard

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

Template Parameters
Thingthe type of the parameters.
Parameters
xconst reference to the first object for comparison.
yconst reference to the second object for comparison.
Returns
The boolean value true if x is lexicographically less than y, and false otherwise.
Exceptions
See std::lexicographical_compare.
Complexity
See std::lexicographical_compare.

The documentation for this struct was generated from the following file: