2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / overload / ambig1.C
blob2adc78c795a5d62f6576f814356fae8d61a4d53c
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-error "" "candidate" }
18 void f(B);                      // { dg-error "" "candidate" }
20 int main()
22   f (42);                       // { dg-error "ambiguous" "ambiguous" }