view gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

// PR c++/94583
// { dg-do compile { target c++20 } }

namespace std { struct strong_ordering { }; }

bool operator==(const struct Q&, const struct Q&);
struct Q {
  // { dg-error "defaulted after its first declaration" "" { target *-*-* } .+1 }
  friend std::strong_ordering operator<=>(const Q&, const Q&) = default;
};
bool b = Q() == Q();