template<class... Types>
constexpr bool operator==(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator!=(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator<(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator>(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator<=(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator>=(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types> requires (three_way_comparable<Types> && ...)
constexpr common_comparison_category_t<compare_three_way_result_t<Types>...>
operator<=>(const variant<Types...>& v, const variant<Types...>& w);
if (v.valueless_by_exception() && w.valueless_by_exception()) return strong_ordering::equal; if (v.valueless_by_exception()) return strong_ordering::less; if (w.valueless_by_exception()) return strong_ordering::greater; if (auto c = v.index() <=> w.index(); c != 0) return c; return get<i>(v) <=> get<i>(w);with i being v.index().