Annex D (normative) Compatibility features [depr] (original) (raw)
D.14 Relational operators [depr.relops]
The header has the following additions:
namespace std::rel_ops { template<class T> bool operator!=(const T&, const T&);template<class T> bool operator> (const T&, const T&);template<class T> bool operator<=(const T&, const T&);template<class T> bool operator>=(const T&, const T&);}
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);
Preconditions: T meets the Cpp17EqualityComparable requirements (Table 28).
template<class T> bool operator>(const T& x, const T& y);
Preconditions: T meets the Cpp17LessThanComparable requirements (Table 29).
template<class T> bool operator<=(const T& x, const T& y);
Preconditions: T meets the Cpp17LessThanComparable requirements (Table 29).
template<class T> bool operator>=(const T& x, const T& y);
Preconditions: T meets the Cpp17LessThanComparable requirements (Table 29).