aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C
blob: ebe81e4b5e92b71af3724294c18bd7e557b28663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This should continue to work.
// { dg-do compile { target c++20 } }

template<class T>
struct A {
  template<class U>
  bool operator==(const A<U>&);
};

int main()
{
  A<int> a1;
  A<void> a2;
  return a1 == a2; // { dg-error "ambiguous, even though the second is reversed" }
}