Debian Codegraph @

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

raw
1 // PR c++/88875
2 // { dg-do compile { target c++11 } }
3
4 #include <initializer_list>
5
6 struct X {
7 X();
8 explicit X(const std::initializer_list<int>& init);
9 };
10
11 struct Y
12 {
13 X x { 1, 2 }; // error
14
15 Y (int)
16 : x {1, 2} // ok
17 {
18 }
19
20 };