aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateDeduction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-12 22:31:52 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-12 22:31:52 +0000
commitc1efb3faefa7d42f974fe384dfd45e5127f8afa6 (patch)
tree12bb1b5fa8703f25a2e312e65ad592bbfd6584ac /lib/Sema/SemaTemplateDeduction.cpp
parent9c4c5c8e174e203da5f841f187bd290a76b34710 (diff)
It looks like we've finished off matching of class template partial specializations; add comments and update the C++ status page
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp
index 252f2d1d0d..48e38ddf14 100644
--- a/lib/Sema/SemaTemplateDeduction.cpp
+++ b/lib/Sema/SemaTemplateDeduction.cpp
@@ -618,12 +618,18 @@ DeduceTemplateArguments(ASTContext &Context,
return Sema::TDK_Success;
}
-
+/// \brief Perform template argument deduction to determine whether
+/// the given template arguments match the given class template
+/// partial specialization per C++ [temp.class.spec.match].
Sema::TemplateDeductionResult
Sema::DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial,
const TemplateArgumentList &TemplateArgs,
TemplateDeductionInfo &Info) {
- // Deduce the template arguments for the partial specialization
+ // C++ [temp.class.spec.match]p2:
+ // A partial specialization matches a given actual template
+ // argument list if the template arguments of the partial
+ // specialization can be deduced from the actual template argument
+ // list (14.8.2).
llvm::SmallVector<TemplateArgument, 4> Deduced;
Deduced.resize(Partial->getTemplateParameters()->size());
if (TemplateDeductionResult Result