[cfe-commits] r122282 - /cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp

Douglas Gregor dgregor at apple.com
Mon Dec 20 14:46:22 PST 2010


Author: dgregor
Date: Mon Dec 20 16:46:22 2010
New Revision: 122282

URL: http://llvm.org/viewvc/llvm-project?rev=122282&view=rev
Log:
Test template instantiation of pack expansions where the parameter pack is in a nested-name-specifier

Modified:
    cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp?rev=122282&r1=122281&r2=122282&view=diff
==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp Mon Dec 20 16:46:22 2010
@@ -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;





More information about the cfe-commits mailing list