std::compare_partial_order_fallback

Header: <compare>

Performs three-way comparison on subexpressions t and u and produces a result of type std::partial_ordering, even if the operator <=> is unavailable.

# Declarations

inline namespace /* unspecified */ {
inline constexpr /* unspecified */
compare_partial_order_fallback = /* unspecified */;
}

(since C++20)

Call signature
template< class T, class U >
requires /* see below */
constexpr std::partial_ordering
compare_partial_order_fallback( T&& t, U&& u ) noexcept(/* see below */);

(since C++20)

# Example

This section is incompleteReason: no example

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 2114(P2167R3)C++20the fallback mechanism only requiredreturn types to be convertible to boolconstraints strengthened
LWG 3465C++20the fallback mechanism did not require u < t to be well-formedrequired

# See also