annotate gcc/testsuite/g++.dg/cpp0x/variadic27.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
2 template<typename Signature>
kono
parents:
diff changeset
3 struct function_traits;
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 template<typename R, typename... ArgTypes>
kono
parents:
diff changeset
6 struct function_traits<R(ArgTypes...)> {
kono
parents:
diff changeset
7 typedef R result_type;
kono
parents:
diff changeset
8 };
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 template<typename T, typename U>
kono
parents:
diff changeset
11 struct same_type {
kono
parents:
diff changeset
12 static const bool value = false;
kono
parents:
diff changeset
13 };
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 template<typename T>
kono
parents:
diff changeset
16 struct same_type<T, T> {
kono
parents:
diff changeset
17 static const bool value = true;
kono
parents:
diff changeset
18 };
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 int a0[same_type<function_traits<int()>::result_type, int>::value? 1 : -1];
kono
parents:
diff changeset
21 int a1[same_type<function_traits<int(float)>::result_type, int>::value? 1 : -1];
kono
parents:
diff changeset
22 int a2[same_type<function_traits<int(double, char)>::result_type, int>::value? 1 : -1];