@@ -422,9 +422,13 @@ constexpr bool operator==(indirect<T, Allocator> const& lhs, U const& rhs)
422422 }
423423}
424424
425- template <class T , class Allocator , class U > requires (!is_ttp_specialization_of_v<U, indirect>)
426- constexpr auto operator<=>(indirect<T, Allocator> const & lhs, U const & rhs)
427- noexcept (synth_three_way_noexcept<T, U>) -> synth_three_way_result_t<T, U>
425+
426+ namespace detail {
427+
428+ template <class T , class A , class U >
429+ constexpr auto three_way_compare_impl (indirect<T, A> const & lhs, U const & rhs)
430+ noexcept (synth_three_way_noexcept<T, U>)
431+ -> synth_three_way_result_t<T, U>
428432{
429433 if (lhs.valueless_after_move ()) [[unlikely]] {
430434 return std::strong_ordering::less;
@@ -433,6 +437,16 @@ constexpr auto operator<=>(indirect<T, Allocator> const& lhs, U const& rhs)
433437 }
434438}
435439
440+ } // detail
441+
442+ template <class T , class A , class U >
443+ constexpr auto operator <=>(indirect<T, A> const & lhs, U const & rhs)
444+ noexcept (synth_three_way_noexcept<T, U>)
445+ // no explicit return type
446+ {
447+ return detail::three_way_compare_impl (lhs, rhs);
448+ }
449+
436450} // iris
437451
438452
0 commit comments