1 // RUN: %clang_cc1 -std=c++2a -verify %s
2 
3 namespace PR44761 {
4   template<typename T> concept X = (sizeof(T) == sizeof(T));
5 
6   template<typename T> struct A {
7     bool operator<(const A&) const & requires X<T>; // #1
8     int operator<=>(const A&) const & requires X<T> && X<int> = delete; // #2
9   };
10   bool k1 = A<int>() < A<int>(); // not ordered by constraints: prefer non-rewritten form
11   bool k2 = A<float>() < A<float>(); // prefer more-constrained 'operator<=>'
12   // expected-error@-1 {{deleted}}
13   // expected-note@#1 {{candidate}}
14   // expected-note@#2 {{candidate function has been explicitly deleted}}
15   // expected-note@#2 {{candidate function (with reversed parameter order) has been explicitly deleted}}
16 }
17