libsemigroups  v3.0.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 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 T>
bool operator() (T const &x, T const &y) const
 Call operator that compares x and y using std::lexicographical_compare.
 
template<typename T>
bool operator() (T first1, T last1, T first2, T last2) const
 Call operator that compares iterators using std::lexicographical_compare.
 

Member Function Documentation

◆ operator()() [1/3]

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

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

Template Parameters
Tthe type of the parameters.
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()() [2/3]

template<typename T>
bool operator() ( T const & x,
T const & y ) const
inline

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

Template Parameters
Tthe 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.

◆ operator()() [3/3]

template<typename T>
bool operator() ( T first1,
T last1,
T first2,
T last2 ) const
inline

Call operator that compares iterators using std::lexicographical_compare.

Template Parameters
Tthe 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.

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