Debian Codegraph @

gcc/testsuite/g++.dg/overload/builtin1.C

raw
1 // Test that we don't discard builtin candidates inappropriately.
2
3 struct B { };
4
5 struct A {
6 operator int ();
7 operator B ();
8 };
9
10 void operator+ (B, B); // { dg-message "operator" "operator" }
11
12 int main ()
13 {
14 A a;
15 a + a; // { dg-error "ambiguous" "ambiguous" }
16 // { dg-message "operator" "match candidate text" { target *-*-* } .-1 }
17 }