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