cpp/utility/compare/partial ordering

The class type is the result type of a three-way comparison that
 * admits all six relational operators


 * admits incomparable values:, , and may all be.

Constants
The type has four valid values, implemented as const static data members of its type:

Conversions
cannot be implicitly converted to other comparison category types, while both std and std are implicitly-convertible to.

Comparisons
Comparison operators are defined between values of this type and literal. This supports the expressions or  that can be used to convert the result of a three-way comparison operator to a boolean relationship; see , , etc.

The behavior of a program that attempts to compare a with anything other than the integer literal  is undefined.

{{member | operator{{==}} | 2= {{dcl begin}} {{dcl | num=1 | 1= friend constexpr bool operator==( partial_ordering v, /*unspecified*/ u ) noexcept; }} {{dcl | num=2 | 1= friend constexpr bool operator==( partial_ordering v, partial_ordering w ) noexcept = default; }} {{dcl end}}

Return value
@1@ if  is,  if  is , , or @2@  if both parameters hold the same value,  otherwise }}

{{member | operator&lt; | 2= {{dcl begin}} {{dcl | num=1 |1= friend constexpr bool operator<( partial_ordering v, /*unspecified*/ u ) noexcept; }} {{dcl | num=2 | 1= friend constexpr bool operator<( /*unspecified*/ u, partial_ordering v ) noexcept; }} {{dcl end}}

Return value
@1@ if  is, and  if  is , , or @2@  if  is , and  if  is , , or }}

{{member | operator&lt;{{=}} | 2= {{dcl begin}} {{dcl | num=1 |1= friend constexpr bool operator<=( partial_ordering v, /*unspecified*/ u ) noexcept; }} {{dcl | num=2 | 1= friend constexpr bool operator<=( /*unspecified*/ u, partial_ordering v ) noexcept; }} {{dcl end}}

Return value
@1@ if  is  or, and  if  is  or @2@  if  is  or , and  if  is  or }}

{{member | operator&gt; | 2= {{dcl begin}} {{dcl | num=1 |1= friend constexpr bool operator>( partial_ordering v, /*unspecified*/ u ) noexcept; }} {{dcl | num=2 | 1= friend constexpr bool operator>( /*unspecified*/ u, partial_ordering v ) noexcept; }} {{dcl end}}

Return value
@1@ if  is, and  if  is , , or @2@  if  is , and  if  is , , or }}

{{member | operator&gt;{{=}} | 2= {{dcl begin}} {{dcl | num=1 |1= friend constexpr bool operator>=( partial_ordering v, /*unspecified*/ u ) noexcept; }} {{dcl | num=2 |1= friend constexpr bool operator>=( /*unspecified*/ u, partial_ordering v ) noexcept; }} {{dcl end}}

Return value
@1@ if is  or, and  if  is  or @2@ if  is  or , and  if  is  or }} {{member | operator<{{=}}> | 2= {{dcl begin}} {{dcl | num=1|1= friend constexpr partial_ordering operator<=>( partial_ordering v, /*unspecified*/ u ) noexcept; }} {{dcl | num=2|1= friend constexpr partial_ordering operator<=>( /*unspecified*/ u, partial_ordering v ) noexcept; }} {{dcl end}}

Return value
@1@ . @2@ if  is,  if  is , otherwise. }}