p9-0x.cpp revision 7b976ece336d209977b25b5c28ee09c2d2146e6a
1// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
2
3template<typename ...Types> struct tuple;
4
5namespace PackExpansionNotAtEnd {
6  template<typename T, typename U>
7  struct tuple_same_with_int {
8    static const bool value = false;
9  };
10
11  template<typename ...Types>
12  struct tuple_same_with_int<tuple<Types...>, tuple<Types..., int>> {
13    static const bool value = true;
14  };
15
16  int tuple_same_with_int_1[tuple_same_with_int<tuple<int, float, double>,
17                                                tuple<int, float, double, int>
18                                                >::value? 1 : -1];
19
20  template<typename ... Types> struct UselessPartialSpec;
21
22           template<typename ... Types, // expected-note{{non-deducible template parameter 'Types'}}
23           typename Tail> // expected-note{{non-deducible template parameter 'Tail'}}
24  struct UselessPartialSpec<Types..., Tail>; // expected-warning{{class template partial specialization contains template parameters that can not be deduced; this partial specialization will never be used}}
25}
26