diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-05 00:53:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-05 00:53:49 +0000 |
commit | b7ae10f764baceba4c890fa44ef14b71822ebd85 (patch) | |
tree | fbde148b9fda7e4174e23c84d8f5fdd5a1930ae9 /clang/lib/Sema/Sema.h | |
parent | 8df7462f698becbef4fc0e7459c065810c38175a (diff) | |
download | bcm5719-llvm-b7ae10f764baceba4c890fa44ef14b71822ebd85.tar.gz bcm5719-llvm-b7ae10f764baceba4c890fa44ef14b71822ebd85.zip |
Several improvements to template argument deduction:
- Once we have deduced template arguments for a class template partial
specialization, we use exactly those template arguments for instantiating
the definition of the class template partial specialization.
- Added template argument deduction for non-type template parameters.
- Added template argument deduction for dependently-sized array types.
With these changes, we can now implement, e.g., the remove_reference
type trait. Also, Daniel's Ackermann template metaprogram now compiles
properly.
llvm-svn: 72909
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r-- | clang/lib/Sema/Sema.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 3969da8eb9b..d8cc01ecf67 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -2019,8 +2019,9 @@ public: const IdentifierInfo &II, SourceRange Range); - bool DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial, - const TemplateArgumentList &TemplateArgs); + TemplateArgumentList * + DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial, + const TemplateArgumentList &TemplateArgs); //===--------------------------------------------------------------------===// // C++ Template Instantiation @@ -2227,7 +2228,7 @@ public: QualType InstantiateType(QualType T, const TemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity); - + OwningExprResult InstantiateExpr(Expr *E, const TemplateArgumentList &TemplateArgs); |