Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/initlist-overload1.C

raw
1 // PR c++/94124 - wrong conversion error with non-viable overload.
2 // { dg-do compile { target c++11 } }
3
4 template <int N> struct A { typedef int _Type[N]; };
5 template <int N> struct B { typename A<N>::_Type _M_elems; };
6 class C { };
7 struct D {
8 D(C);
9 };
10
11 struct F {
12 F(B<2>);
13 F(D); // This overload should not be viable.
14 };
15 F fn1() { return {{{0}}}; }