The following are defined for exposition only
to aid in the specification of the library:
template<class T> constexpr decay_t<T> decay-copy(T&& v)
noexcept(is_nothrow_convertible_v<T, decay_t<T>>)
{ return std::forward<T>(v); }
constexpr auto synth-three-way =
[]<class T, class U>(const T& t, const U& u)
requires requires {
{ t < u } -> boolean-testable;
{ u < t } -> boolean-testable;
}
{
if constexpr (three_way_comparable_with<T, U>) {
return t <=> u;
} else {
if (t < u) return weak_ordering::less;
if (u < t) return weak_ordering::greater;
return weak_ordering::equivalent;
}
};
template<class T, class U=T>
using synth-three-way-result = decltype(synth-three-way(declval<T&>(), declval<U&>()));