23 General utilities library [utilities]

23.2 Utility components [utility]

23.2.2 Operators [operators]

To avoid redundant definitions of operator!= out of operator== and operators >, <=, and >= out of operator<, the library provides the following:
template <class T> bool operator!=(const T& x, const T& y);
Requires: Type T is EqualityComparable.
Returns: !(x == y).
template <class T> bool operator>(const T& x, const T& y);
Requires: Type T is LessThanComparable.
Returns: y < x.
template <class T> bool operator<=(const T& x, const T& y);
Requires: Type T is LessThanComparable.
Returns: !(y < x).
template <class T> bool operator>=(const T& x, const T& y);
Requires: Type T is LessThanComparable.
Returns: !(x < y).
In this library, whenever a declaration is provided for an operator!=, operator>, operator>=, or operator<=, and requirements and semantics are not explicitly provided, the requirements and semantics are as specified in this Clause.