================ @@ -3876,6 +3864,41 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( FD = const_cast<FunctionDecl *>(FDFriend); Owner = FD->getLexicalDeclContext(); } + + // C++20 [temp.deduct.general]p5: [DR2369] + // If the function template has associated constraints, those constraints are + // checked for satisfaction. If the constraints are not satisfied, type + // deduction fails. + bool NeedConstraintChecking = + !PartialOverloading || + CanonicalBuilder.size() == + FunctionTemplate->getTemplateParameters()->size(); + // FIXME: We haven't implemented DR2369 for lambdas yet, because we need ---------------- cor3ntin wrote:
```suggestion // FIXME: We haven't implemented CWG2369 for lambdas yet, because we need ``` https://github.com/llvm/llvm-project/pull/102857 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits