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 5995218080a..c2f04f1572b 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 @@ -839,7 +839,8 @@ public class TemplateArgumentDeduction { // Try to deduce from the original argument type, but if it fails, fall back to the simplified // argument type. return fromType(p.getTypeValue(), a.getOriginalTypeValue(), false, point) - || fromType(p.getTypeValue(), a.getTypeValue(), false, point); + || (a.getTypeValue() != a.getOriginalTypeValue() + && fromType(p.getTypeValue(), a.getTypeValue(), false, point)); } private boolean fromType(IType p, IType a, boolean allowCVQConversion, IASTNode point) throws DOMException {