* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / auto4.C
blob36144fd9aaec468b1daa8d313074f4e85c39cbe3
1 // Testcase for deduction of std::initializer_list for auto.
2 // { dg-do run { target c++11 } }
4 #include <typeinfo>
5 #include <initializer_list>
6 extern "C" void abort();
8 template <class T>
9 void f (T t)
11   auto ilt = { &t, &t };
12   if (typeid(ilt) != typeid(std::initializer_list<T*>))
13     abort();
15   auto il = { 1, 2, 3 };
16   if (typeid(il) != typeid(std::initializer_list<int>))
17     abort();
20 int main()
22   auto il = { 1, 2, 3 };
23   if (typeid(il) != typeid(std::initializer_list<int>))
24     abort();
26   f('c');