p2-0x.cpp revision 0d80abc3b7fb0dca26fb6b272d2c3484f86fb7e7
1// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
2
3// If type deduction cannot be done for any P/A pair, or if for any
4// pair the deduction leads to more than one possible set of deduced
5// values, or if different pairs yield different deduced values, or if
6// any template argument remains neither deduced nor explicitly
7// specified, template argument deduction fails.
8
9template<typename ...> struct tuple;
10
11template<typename T, typename U>
12struct same_tuple {
13  static const bool value = false;
14};
15
16template<typename ...Types1>
17struct same_tuple<tuple<Types1...>, tuple<Types1...> > {
18  static const bool value = true;
19};
20
21//int same_tuple_check1[same_tuple<tuple<int, float>, tuple<int, double>>::value? -1 : 1];
22int same_tuple_check2[same_tuple<tuple<float, double>, tuple<float, double>>::value? 1 : -1];
23
24