summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp')
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
index a01ffc338fb..a061104d656 100644
--- a/clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
@@ -37,4 +37,33 @@ namespace PacksAtDifferentLevels {
pair<int, unsigned int>,
pair<long, unsigned long>>
>::value == 1? 1 : -1];
+
+ template<unsigned ...Values> struct unsigned_tuple { };
+ template<typename ...Types>
+ struct X1 {
+ template<typename, typename> struct Inner {
+ static const unsigned value = 0;
+ };
+
+ template<typename ...YTypes>
+ struct Inner<tuple<pair<Types, YTypes>...>,
+ unsigned_tuple<sizeof(Types) + sizeof(YTypes)...>> {
+ static const unsigned value = 1;
+ };
+ };
+
+ int check2[X1<short, int, long>::Inner<tuple<pair<short, unsigned short>,
+ pair<int, unsigned int>,
+ pair<long, unsigned long>>,
+ unsigned_tuple<sizeof(short) + sizeof(unsigned short),
+ sizeof(int) + sizeof(unsigned int),
+ sizeof(long) + sizeof(unsigned long)>
+ >::value == 1? 1 : -1];
+ int check3[X1<short, int>::Inner<tuple<pair<short, unsigned short>,
+ pair<int, unsigned int>,
+ pair<long, unsigned long>>,
+ unsigned_tuple<sizeof(short) + sizeof(unsigned short),
+ sizeof(int) + sizeof(unsigned int),
+ sizeof(long) + sizeof(unsigned long)>
+ >::value == 0? 1 : -1];
}
OpenPOWER on IntegriCloud