https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104606
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've confirmed that removing those 2 lines:
template<typename _Tp, typename _Up>
- requires (!__is_optional_v<_Up>)
- && three_way_comparable_with<_Tp, _Up>
constexpr compare_three_way_result_t<_Tp, _Up>
operator<=>(const optional<_Tp>& __x, const _Up& __v)
{ return bool(__x) ? *__x <=> __v : strong_ordering::less; }
makes it accepted again.
That doesn't mean it doesn't need to be a FE bug, or it could not be a bug at
all, we need some C++ lawyer for that.