aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg5.C
blob: a01d3d3ead3ff6d3cb2d98deabd6fde9eab0469e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile { target c++20 } }
// { dg-options "" }

#include <compare>

struct C {
  int y;
  int x[];					// { dg-message "cannot default compare flexible array member" }
  auto operator<=>(C const&) const = default;	// { dg-message "is implicitly deleted because the default definition would be ill-formed" }
};

bool
foo (C &c1, C &c2)
{
  return c1 > c2;	// { dg-error "use of deleted function" }
}