[libc++] Fix missing requires clause on variant operator<=>
authorJoe Loser <joeloser@fastmail.com>
Mon, 17 Oct 2022 00:47:26 +0000 (18:47 -0600)
committerJoe Loser <joeloser@fastmail.com>
Mon, 17 Oct 2022 22:23:02 +0000 (16:23 -0600)
commitdd9afdbb2ab47ad09e36c0afc94049285b474264
treef75b9adfc2d0938a787bc45d07680a0ce06fdcf3
parent021e6e05d3d966d2291434fec1ec5d6db5633963
[libc++] Fix missing requires clause on variant operator<=>

`std::variant::operator<=>` is missing a requires clause ensuring that
`operator<=>` only exists when all of the types in the variant are
`three_way_comparable`.

Add the missing requires clause and adjust the existing test which was
incorrect.

Fixes https://github.com/llvm/llvm-project/issues/58192.

Differential Revision: https://reviews.llvm.org/D136050
libcxx/include/variant
libcxx/test/std/utilities/variant/variant.relops/three_way.pass.cpp