Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/variadic8.C

raw
1 // { dg-do compile { target c++11 } }
2 template<typename... Args>
3 struct tuple_base {
4 static const int value = 0;
5 };
6
7 template<>
8 struct tuple_base<int*>
9 {
10 static const int value = 1;
11 };
12
13 template<typename T>
14 struct tuple_base<T*>
15 {
16 static const int value = 2;
17 };
18
19 template<typename... Args>
20 struct tuple_of_pointers : tuple_base<Args*...> { };
21
22 int a1[tuple_of_pointers<int>::value == 1? 1 : -1];
23 int a2[tuple_of_pointers<float>::value == 2? 1 : -1];