[llvm-branch-commits] [clang] [clang] Finish implementation of P0522 (PR #96023)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 19 02:42:37 PDT 2024


================
@@ -3186,20 +3239,36 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction(
 
   // Check that we produced the correct argument list.
   TemplateParameterList *TemplateParams = Template->getTemplateParameters();
+  auto notSame = [&](unsigned I, const TemplateArgument &P,
+                     const TemplateArgument &A) {
+    if (isSameTemplateArg(S.Context, P, A, PartialOrdering,
+                          /*PackExpansionMatchesPack=*/true))
+      return false;
+    Info.Param = makeTemplateParameter(TemplateParams->getParam(I));
+    Info.FirstArg = P;
+    Info.SecondArg = A;
+    return true;
+  };
----------------
cor3ntin wrote:

I'm not a fan of the double negation here

https://github.com/llvm/llvm-project/pull/96023


More information about the llvm-branch-commits mailing list