Implement support for non-type template parameter packs whose type is
commitf08fe4362305ef9a4d415b0a3e435ebc3d587f27
authorDouglas Gregor <doug.gregor@gmail.com>
Wed, 19 Jan 2011 20:10:05 +0000 (19 20:10 +0000)
committerDouglas Gregor <doug.gregor@gmail.com>
Wed, 19 Jan 2011 20:10:05 +0000 (19 20:10 +0000)
tree0b18dbc34cc3a9d14d470beaf483f1d618579c8d
parent52205a7303f6453dd61e764e6cdcb1e372a1e34f
Implement support for non-type template parameter packs whose type is
a pack expansion, e.g., the parameter pack Values in:

  template<typename ...Types>
  struct Outer {
    template<Types ...Values>
    struct Inner;
  };

This new implementation approach introduces the notion of an
"expanded" non-type template parameter pack, for which we have already
expanded the types of the parameter pack (to, say, "int*, float*",
for Outer<int*, float*>) but have not yet expanded the values. Aside
from creating these expanded non-type template parameter packs, this
patch updates template argument checking and non-type template
parameter pack instantiation to make use of the appropriate types in
the parameter pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123845 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/DeclTemplate.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/AST/DeclTemplate.cpp
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateDeduction.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp