blob: d0e4a89222588c3c910a4f7d0372d93240c1201d (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Test that very different operators still cause ambiguity with reversed.
struct X { operator int(); };
bool operator==(X, int); // #1 { dg-message "reversed" "" { target c++20 } }
struct Y { operator int(); };
bool operator==(Y, int); // #2 { dg-message "reversed" "" { target c++20 } }
X x; Y y;
bool b1 = x == y; // { dg-error "ambiguous" "" { target c++20 } }
bool b2 = y == x; // { dg-error "ambiguous" "" { target c++20 } }
|