[depr.relops] # Annex D (normative) Compatibility features [[depr]](./#depr) ## D.14 Relational operators [depr.relops] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L444) The header [](utility.syn#header:%3cutility%3e "22.2.1 Header synopsis [utility.syn]") has the following additions: namespace std::rel_ops {template bool operator!=(const T&, const T&); template bool operator> (const T&, const T&); template bool operator<=(const T&, const T&); template bool operator>=(const T&, const T&);} [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L456) To avoid redundant definitions of operator!= out of operator== and operators >, <=, and >= out of operator<, the library provides the following: [🔗](#lib:operator!=) `template bool operator!=(const T& x, const T& y); ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L467) *Preconditions*: T meets the *Cpp17EqualityComparable* requirements (Table [28](utility.arg.requirements#tab:cpp17.equalitycomparable "Table 28: Cpp17EqualityComparable requirements"))[.](#3.sentence-1) [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L471) *Returns*: !(x == y)[.](#4.sentence-1) [🔗](#lib:operator%3e) `template bool operator>(const T& x, const T& y); ` [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L482) *Preconditions*: T meets the *Cpp17LessThanComparable* requirements (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements"))[.](#5.sentence-1) [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L486) *Returns*: y < x[.](#6.sentence-1) [🔗](#lib:operator%3c=) `template bool operator<=(const T& x, const T& y); ` [7](#7) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L497) *Preconditions*: T meets the *Cpp17LessThanComparable* requirements (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements"))[.](#7.sentence-1) [8](#8) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L501) *Returns*: !(y < x)[.](#8.sentence-1) [🔗](#lib:operator%3e=) `template bool operator>=(const T& x, const T& y); ` [9](#9) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L512) *Preconditions*: T meets the *Cpp17LessThanComparable* requirements (Table [29](utility.arg.requirements#tab:cpp17.lessthancomparable "Table 29: Cpp17LessThanComparable requirements"))[.](#9.sentence-1) [10](#10) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L516) *Returns*: !(x < y)[.](#10.sentence-1)