Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite5.C

raw
1 // { dg-do compile { target c++11 } }
2
3 template<typename T>
4 struct A {
5 A() {}
6
7 template<typename U>
8 A(const A<U>&) {}
9
10 bool operator==(const A&) const { return true; }
11 };
12
13 A<const int> a;
14 A<int> b;
15 auto c = (a == b); // { dg-error "ambiguous, even though the second is reversed" "" { target c++20 } }