* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist-deduce.C
blob6ae32a6c55df095eab8b20419a96af33c15d72d3
1 // Test for deduction of T as std::initializer_list.  This isn't currently
2 // supported by the working draft, but is necessary for perfect forwarding
3 // of initializer-lists to things that can take a std::initializer_list.
5 // { dg-options "-fdeduce-init-list" }
6 // { dg-do run { target c++11 } }
8 #include <initializer_list>
10 struct A
12   A(std::initializer_list<int>) { }
15 void f (A a) { }
17 template <class T>
18 auto g (T&& t) -> decltype (f(t)) // { dg-warning "call" }
20   return f(t);
23 int main()
25   g({1});                       // { dg-warning "deduc" }
28 // { dg-prune-output "-fno-deduce-init-list" }