Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / overload / ambig1.C
blobd11e00a187b5459e2d7a8f0959d3001406a79ca4
1 // [over.best.ics]: For the purpose of ranking implicit conversion
2 // sequences as described in _over.ics.rank_, the ambiguous conversion
3 // sequence is treated as a user-defined sequence that is indistinguishable
4 // from any other user- defined conversion sequence.
6 struct A
8   A(long);
9   A(char);
12 struct B
14   B(int);
17 void f(A);                      // { dg-message "note" "candidate" }
18 void f(B);                      // { dg-message "note" "candidate" }
20 int main()
22   f (42);                       // { dg-error "ambiguous" "ambiguous" }
23   // { dg-message "candidate" "candidate note" { target *-*-* } 22 }