summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/builtin1.C
blob: fdd208135c7ca8e476a0b75653cb976dc410b506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Test that we don't discard builtin candidates inappropriately.

struct B { };

struct A {
  operator int ();
  operator B ();
};

void operator+ (B, B);		// { dg-message "operator" "operator" }

int main ()
{
  A a;
  a + a;			// { dg-error "ambiguous" "ambiguous" }
  // { dg-message "operator" "match candidate text" { target *-*-* } 15 }
  // { dg-message "candidates" "candidates" { target *-*-* } 15 }
}