* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype45.C
blobf768d8554e1f16263f96b1703c6d42f14cdc758a
1 // PR c++/51878
2 // { dg-do compile { target c++11 } }
4 template<class F, class... T>
5 auto indirect_call(F f, T... t) -> decltype(f(t...))
7   return f(t...);
10 template<class F, class T>
11 struct VariadicBind
13   F f;
14   T t;
16   template<class... A>
17   auto operator()(A... a) -> decltype(indirect_call(f, t, a...))
18   {
19     return indirect_call(f, t, a...);
20   }
23 template<class F>
24 void apply(F f)
26   f();
29 template<class F, class V1, class... V>
30 void apply(F f, V1 v1, V... v)
32   apply(VariadicBind<F, int>{f, v1}, v...);
35 void func(int, int) { }
37 int main()
39   apply(func, 0, 0);