1 // { dg-do assemble }
2 // Bug: g++ prefers a non-matching operator== over user-defined conversions
3 // and a default operator==.
4
5 struct A {
6 operator int ();
7 };
8
9 struct B {
10 friend int operator== (B, int);
11 };
12
foo(A & a)13 int foo (A& a) {
14 return a == 1;
15 }
16