2 // { dg-do compile { target c++11 } }
5 int a({0}); // { dg-error "" }
8 int const &b({0}); // { dg-error "" }
11 struct A1 { int a[2]; A1(); };
12 A1::A1():a({1, 2}) { } // { dg-error "" }
14 struct A { explicit A(int, int); A(int, long); };
17 A c({1, 2}); // { dg-error "" }
19 // valid (by copy constructor).
25 #include <initializer_list>
28 template<typename ...T>
29 B(std::initializer_list<int>, T ...);
32 // invalid (the first phase only considers init-list ctors)
33 // (for the second phase, no constructor is viable)
34 B f{1, 2, 3}; // { dg-error "" }
36 // valid (T deduced to <>).