23 General utilities library [utilities]

23.2 Utility components [utility]

23.2.2 Operators [operators]

Чтобы избежать лишних определений operator!= отказа от operator== и операторов >, <=и >= из operator<, библиотека предоставляет следующее:

template <class T> bool operator!=(const T& x, const T& y);

Requires: Типа T есть EqualityComparable.

Returns: !(x == y).

template <class T> bool operator>(const T& x, const T& y);

Requires: Типа T есть LessThanComparable.

Returns: y < x.

template <class T> bool operator<=(const T& x, const T& y);

Requires: Типа T есть LessThanComparable.

Returns: !(y < x).

template <class T> bool operator>=(const T& x, const T& y);

Requires: Типа T есть LessThanComparable.

Returns: !(x < y).

В этой библиотеке, когда декларация предоставляется за operator!=, operator>, operator>=или operator<=, а также требования и семантика явно не предусмотрено, требования и семантика , как указано в настоящем пункте.