diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index c965ea2641c..53856abd519 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -2285,7 +2285,7 @@ public class AST2TemplateTests extends AST2BaseTest { // void test(int* x) { // f(x); // } - public void _testFunctionTemplate_309564() throws Exception { + public void testFunctionTemplate_309564() throws Exception { final String code = getAboveComment(); parseAndCheckBindings(code); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java index 336bec2cd12..d0e5ede4655 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java @@ -211,7 +211,7 @@ public class TemplateArgumentDeduction { // 14.8.2.1-2 if (par instanceof ICPPReferenceType) { // If P is an rvalue reference to a cv-unqualified template parameter and the argument is an - // lvalue, the type A& �lvalue reference to A� is used in place of A for type deduction. + // lvalue, the type "lvalue reference to A" is used in place of A for type deduction. isReferenceTypeParameter= true; final ICPPReferenceType refPar = (ICPPReferenceType) par; if (refPar.isRValueReference() && refPar.getType() instanceof ICPPTemplateParameter && argIsLValue.get(j)) { @@ -275,6 +275,10 @@ public class TemplateArgumentDeduction { } } } + // Bug 309564: For partial ordering not all arguments need to be deduced + if (checkExactMatch) + return true; + if (!deduct.fExplicitArgs.mergeToExplicit(deduct.fDeducedArgs)) return false;