1 // RUN: %clang_cc1 -std=c++2a -verify -Wno-defaulted-function-deleted -include %s %s
3 // RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t.pch
4 // RUN: %clang_cc1 -std=c++2a -include-pch %t.pch %s -verify
6 // RUN: %clang_cc1 -std=c++2a -emit-pch -fpch-instantiate-templates %s -o %t.pch
7 // RUN: %clang_cc1 -std=c++2a -include-pch %t.pch %s -verify
9 // expected-no-diagnostics
15 struct strong_ordering
{
17 constexpr operator int() const { return n
; }
18 static const strong_ordering equal
, greater
, less
;
20 constexpr strong_ordering
strong_ordering::equal
= {0};
21 constexpr strong_ordering
strong_ordering::greater
= {1};
22 constexpr strong_ordering
strong_ordering::less
= {-1};
25 // Ensure that we can round-trip DefaultedFunctionInfo through an AST file.
26 namespace LookupContext
{
30 template <typename T
> auto f() {
31 bool operator==(const T
&, const T
&);
32 bool operator<(const T
&, const T
&);
35 std::strong_ordering
operator<=>(const B
&) const = default;
44 namespace LookupContext
{
46 bool operator<=>(const A
&, const A
&) = delete;
47 bool operator==(const A
&, const A
&) = delete;
48 bool operator<(const A
&, const A
&) = delete;
49 bool cmp
= N::f
<A
>() < N::f
<A
>();