diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-20 22:46:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-20 22:46:22 +0000 |
commit | 88f30dee6ca6d99e46d4ce61f691fb3dff4ae7c8 (patch) | |
tree | 4e6e2bf0fb58b02f86f4127df6ff119260028064 | |
parent | 592f241d0abd000f404a12fba1474d4d963d7ff7 (diff) |
Test template instantiation of pack expansions where the parameter pack is in a nested-name-specifier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122282 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CXX/temp/temp.decls/temp.variadic/p4.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/CXX/temp/temp.decls/temp.variadic/p4.cpp b/test/CXX/temp/temp.decls/temp.variadic/p4.cpp index db4db7ddd2..b4f7c09981 100644 --- a/test/CXX/temp/temp.decls/temp.variadic/p4.cpp +++ b/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; |