* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / variadic29.C
blob8931e0fa6b3c94f006372b5a85144f01ad4a5e4f
1 // { dg-do compile { target c++11 } }
2 template<typename Signature>
3 struct function_traits;
5 template<typename R, typename... ArgTypes>
6 struct function_traits<R(ArgTypes...)> {
7   typedef R result_type;
8 };
10 template<typename R, typename Class, typename... ArgTypes>
11 struct function_traits<R (Class::*)(ArgTypes...)> {
12   typedef R result_type;
15 template<typename R, typename Class, typename... ArgTypes>
16 struct function_traits<R (Class::*)(ArgTypes...) const> {
17   typedef R result_type;
20 template<typename T, typename U>
21 struct same_type {
22   static const bool value = false;
25 template<typename T>
26 struct same_type<T, T> {
27   static const bool value = true;
30 struct X {};
32 int a0[same_type<function_traits<int (X::*)()>::result_type, int>::value? 1 : -1];
33 int a1[same_type<function_traits<int (X::*)(float)>::result_type, int>::value? 1 : -1];
34 int a2[same_type<function_traits<int (X::*)(double, char)>::result_type, int>::value? 1 : -1];
35 int a3[same_type<function_traits<int (X::*)(double, char) const>::result_type, int>::value? 1 : -1];