summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-20 22:46:22 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-20 22:46:22 +0000
commit9a9116ec8d25a90477e2e9db2c9e10e24a875c59 (patch)
tree8405aa49e4b5cba12aa097a262545eb1cd2cfe60
parent7f73489c3f35814192c85c3919d5847a66c8e071 (diff)
downloadbcm5719-llvm-9a9116ec8d25a90477e2e9db2c9e10e24a875c59.tar.gz
bcm5719-llvm-9a9116ec8d25a90477e2e9db2c9e10e24a875c59.zip
Test template instantiation of pack expansions where the parameter pack is in a nested-name-specifier
llvm-svn: 122282
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
index db4db7ddd26..b4f7c09981f 100644
--- a/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
@@ -1,15 +1,28 @@
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
-template<typename... Types> struct Tuple;
+template<typename... Types> struct tuple;
// FIXME: Many more bullets to go
// In a template-argument-list (14.3); the pattern is a template-argument.
template<typename ...Types>
struct tuple_of_refs {
- typedef Tuple<Types& ...> types;
+ typedef tuple<Types& ...> types;
};
-Tuple<int&, float&> *t_int_ref_float_ref;
+tuple<int&, float&> *t_int_ref_float_ref;
tuple_of_refs<int&, float&>::types *t_int_ref_float_ref_2 = t_int_ref_float_ref;
+template<typename ...Types>
+struct extract_nested_types {
+ typedef tuple<typename Types::type...> types;
+};
+
+template<typename T>
+struct identity {
+ typedef T type;
+};
+
+tuple<int, float> *t_int_float;
+extract_nested_types<identity<int>, identity<float> >::types *t_int_float_2
+ = t_int_float;
OpenPOWER on IntegriCloud