diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-29 06:31:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-29 06:31:36 +0000 |
commit | 516e6e09821a61e8975c787e189949723249e7c5 (patch) | |
tree | 40f0393f7d6014122b17801b39d013be9a91e4d3 /lib/Sema/SemaTemplateDeduction.cpp | |
parent | 31dce8f606c5ff4a51db67caa24ac3312ccea3f3 (diff) |
When performing partial ordering of class template partial
specializations, substitute the deduced template arguments and check
the resulting substitution before concluding that template argument
deduction succeeds. This marvelous little fix makes a bunch of
Boost.Spirit tests start working.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateDeduction.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index 031209235c..2bb97eba11 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/lib/Sema/SemaTemplateDeduction.cpp @@ -2384,7 +2384,11 @@ Sema::getMoreSpecializedPartialSpecialization( Info, Deduced, 0); - + if (Better1) + Better1 = !::FinishTemplateArgumentDeduction(*this, PS2, + PS1->getTemplateArgs(), + Deduced, Info); + // Determine whether PS2 is at least as specialized as PS1 Deduced.clear(); Deduced.resize(PS1->getTemplateParameters()->size()); @@ -2395,6 +2399,10 @@ Sema::getMoreSpecializedPartialSpecialization( Info, Deduced, 0); + if (Better2) + Better2 = !::FinishTemplateArgumentDeduction(*this, PS1, + PS2->getTemplateArgs(), + Deduced, Info); if (Better1 == Better2) return 0; |