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.cpp20
1 files changed, 20 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 649c9b8ef26..ff2134dc33c 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
@@ -11,3 +11,23 @@ struct X0 {
void test_X0() {
X0<int>().f<1, 2, 3, 4, 5>();
}
+
+namespace PacksAtDifferentLevels {
+ template<typename...> struct tuple { };
+ template<typename T, typename U> struct pair { };
+
+ template<typename ...Types>
+ struct X {
+ template<typename> struct Inner;
+
+ template<typename ...YTypes>
+ struct Inner<tuple<pair<Types, YTypes>...> > {
+ static const unsigned zero = sizeof...(Types) - sizeof...(YTypes);
+ };
+ };
+
+ int check0[X<short, int, long>::Inner<tuple<pair<short, unsigned short>,
+ pair<int, unsigned int>,
+ pair<long, unsigned long>>
+ >::zero == 0? 1 : -1];
+}
OpenPOWER on IntegriCloud