Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C

raw
1 // PR c++/55220
2 // { dg-do compile { target c++11 } }
3
4 template <typename ...> struct something_like_tuple
5 {
6
7 };
8
9 template <typename, typename> struct is_last
10 {
11 static const bool value = false;
12 };
13
14 // Head is non-deducible, so this can't work as the user intended
15 template <typename T, template <typename ...> class Tuple, typename ... Head>
16 struct is_last<T, Tuple<Head ..., T>>
17 {
18 static const bool value = true;
19 };
20
21 #define SA(X) static_assert (X, #X)
22
23 typedef something_like_tuple<char, int, float> something_like_tuple_t;
24 SA ((is_last<float, something_like_tuple_t>::value == false));
25 SA ((is_last<int, something_like_tuple_t>::value == false));