aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-14 22:40:04 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-14 22:40:04 +0000
commit6a24bfda084f06a0b252b7befe8cbb17fce7f94e (patch)
treed8c6f97bb8b00178d8327dbf9a5ee25af3963186 /test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
parentc39b5e867df74904ac7e50d225b3cca0db43571f (diff)
Handle substitutions into function parameter packs whose patterns
contain multiple parameter packs at different levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123488 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp')
-rw-r--r--test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp b/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
index a061104d65..64554ab634 100644
--- a/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
+++ b/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
@@ -66,4 +66,26 @@ namespace PacksAtDifferentLevels {
sizeof(int) + sizeof(unsigned int),
sizeof(long) + sizeof(unsigned long)>
>::value == 0? 1 : -1];
+
+ template<typename ...Types>
+ struct X2 {
+ template<typename> struct Inner {
+ static const unsigned value = 1;
+ };
+
+ template<typename R, typename ...YTypes>
+ struct Inner<R(pair<Types, YTypes>...)> {
+ static const unsigned value = sizeof...(Types) - sizeof...(YTypes);
+ };
+ };
+
+ int check4[X2<short, int, long>::Inner<int(pair<short, unsigned short>,
+ pair<int, unsigned int>,
+ pair<long, unsigned long>)
+ >::value == 0? 1 : -1];
+
+ int check5[X2<short, int>::Inner<int(pair<short, unsigned short>,
+ pair<int, unsigned int>,
+ pair<long, unsigned long>)
+ >::value == 1? 1 : -1];
}