]> granicus.if.org Git - clang/commit
Several improvements to template argument deduction:
authorDouglas Gregor <dgregor@apple.com>
Fri, 5 Jun 2009 00:53:49 +0000 (00:53 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 5 Jun 2009 00:53:49 +0000 (00:53 +0000)
commit199d99192fbcca9f043596c40ead4afab4999dba
tree14716988cdd0af1ae955782954af60f098390770
parent29b1d07a87a2038ae5b4128a0b534badd728707d
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72909 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclTemplate.h
lib/Sema/Sema.h
lib/Sema/SemaTemplateDeduction.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/SemaTemplateInstantiateExpr.cpp
test/SemaTemplate/ackermann.cpp [new file with mode: 0644]
test/SemaTemplate/temp_class_spec.cpp