From cppreference.com
Defined in header
template<classT>structless_equal;(until C++14)template<classT=void>structless_equal;(since C++14)Function object for performing comparisons. The main template invokes operator<= on type T.
Specializations
(C++14)
function object implementing x<=y deducing parameter and return types
(class template specialization)
Member types
Type Definition result_type(deprecated in C++17)(removed in C++20)boolfirst_argument_type(deprecated in C++17)(removed in C++20)Tsecond_argument_type(deprecated in C++17)(removed in C++20)TThese member types are obtained via publicly inheriting std::binary_function<T,T,bool>.
(until C++11)Member functions
operator()
checks if the first argument is less than or equal to the second
(public member function)std::less_equal::operator()
booloperator()(constT&lhs,constT&rhs)const;(constexpr since C++14)Checks if lhs is less than or equal to rhs.
Parameters
lhs, rhs - values to compare Return value
lhs<=rhs.
If T is a pointer type, the result is consistent with the
implementation-defined strict total order over pointers
.
Exceptions
May throw implementation-defined exceptions.
Possible implementation
constexprbooloperator()(constT&lhs,constT&rhs)const{returnlhs<=rhs;// assumes that the implementation handles pointer total order}Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior
C++98 the pointer total order might be inconsistent guaranteed to be consistent See also