aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-synth16.C
blob: 7dbe7e1db75ae267814047b7099356b64c73ca19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/113063
// { dg-do link { target c++20 } }

#include <compare>

int main() {
  struct X {
    auto operator<=>(const X&) const = default;
  };
  X x;
  static_assert(noexcept(x <=> x));
  x <=> x;
  constexpr auto r = x <=> x;
}