* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist6.C
blob3d02960b9614936a91c771c4679915a2a577832d
1 // Test for initlist lifetime
2 // { dg-do run { target c++11 } }
4 #include <initializer_list>
6 int c;
8 struct A
10   A(int,int) { ++c; }
11   ~A() { --c; }
14 void f (std::initializer_list<A> l) { }
16 int main()
18   f({ {1,2}, {3,4} });
19   if (c != 0)
20     return 1;
22   {
23     std::initializer_list<A> l { {1,2}, {3,4} };
24     if (c != 2)
25       return 2;
26   }
27   if (c != 0)
28     return 3;