Debian Codegraph @

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

raw
1 // PR c++/77563
2
3 struct A {
4 A(int) {}
5 A(unsigned) {} // Comment to make it work
6
7 explicit A(long) {} // Comment to make it work
8 };
9
10 void f(A) { }
11
12 int main() {
13 f(2);
14 f(3l); // { dg-error "ambiguous" }
15 }