Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / variadic28.C
blob57f6d23b21e7a24626194edb1e8b94b8a3ed512b
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......)> {     // { dg-warning "omission of ',' before varargs '...' is deprecated" "" { target c++26 } }
7   typedef R result_type;
8 };
10 template<typename T, typename U>
11 struct same_type {
12   static const bool value = false;
15 template<typename T>
16 struct same_type<T, T> {
17   static const bool value = true;
20 int a0[same_type<function_traits<int(double, char...)>::result_type, int>::value? 1 : -1];      // { dg-warning "omission of ',' before varargs '...' is deprecated" "" { target c++26 } }
21 int a1[same_type<function_traits<int(double, char,...)>::result_type, int>::value? 1 : -1];
22 int a2[same_type<function_traits<int(char,...)>::result_type, int>::value? 1 : -1];
23 int a3[same_type<function_traits<int(...)>::result_type, int>::value? 1 : -1];
24 int a4[same_type<function_traits<int(double x, char...)>::result_type, int>::value? 1 : -1];    // { dg-warning "omission of ',' before varargs '...' is deprecated" "" { target c++26 } }
25 int a5[same_type<function_traits<int(double, char y...)>::result_type, int>::value? 1 : -1];    // { dg-warning "omission of ',' before varargs '...' is deprecated" "" { target c++26 } }