c++: local class memfn synth from uneval context [PR113063]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / spaceship-synth16.C
blob37a183de0f5bb1eecba023baa821a7045c55cf16
1 // PR c++/113063
2 // { dg-do link { target c++20 } }
4 #include <compare>
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;