Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/spaceship-synth16.C

raw
1 // PR c++/113063
2 // { dg-do link { target c++20 } }
3
4 #include <compare>
5
6 int main() {
7 struct X {
8 auto operator<=>(const X&) const = default;
9 };
10 X x;
11 static_assert(noexcept(x <=> x));
12 x <=> x;
13 constexpr auto r = x <=> x;
14 }