OSDN Git Service

PR c++/44157
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / variadic13.C
1 // { dg-options "-std=gnu++0x" }
2 template<typename... Args> struct tuple1 { };
3 template<typename... Args> struct tuple2 { };
4
5 template<typename T, typename U>
6 struct same_tuple_args {
7   static const bool value = false;
8 };
9
10 template<typename... Args>
11 struct same_tuple_args<tuple1<Args...>, tuple2<Args...> > {
12   static const bool value = true;
13 };
14
15 int same0[same_tuple_args<tuple1<>, tuple2<> >::value? 1 : -1];
16 int same1[same_tuple_args<tuple1<int>, tuple2<int> >::value? 1 : -1];
17 int same2[same_tuple_args<tuple1<float, int>, tuple2<float, int> >::value? 1 : -1];
18 int diff0[!same_tuple_args<tuple1<>, tuple2<int> >::value? 1 : -1];
19 int diff1[!same_tuple_args<tuple1<int, float>, tuple2<float, int> >::value? 1 : -1];