std::compare_strong_order_fallback
Min standard notice:
Header: <compare>
Performs three-way comparison on subexpressions t and u and produces a result of type std::strong_ordering, even if the operator <=> is unavailable.
# Declarations
inline namespace /* unspecified */ {
inline constexpr /* unspecified */
compare_strong_order_fallback = /* unspecified */;
}
(since C++20)
Call signature
template< class T, class U >
requires /* see below */
constexpr std::strong_ordering
compare_strong_order_fallback( T&& t, U&& u ) noexcept(/* see below */);
(since C++20)
# Example
This section is incompleteReason: no example
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 2114(P2167R3) | C++20 | the fallback mechanism only requiredreturn types to be convertible to bool | constraints strengthened |