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