comparison gcc/testsuite/g++.dg/cpp0x/initlist-overload1.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
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}}}; }