================ @@ -4371,6 +4394,34 @@ Sema::TemplateDeductionResult Sema::DeduceTemplateArguments( // corresponding argument is a list? PackScope.nextPackElement(); } + } else if (!IsTrailingPack && !PackScope.isPartiallyExpanded() && + PackScope.isDeducedFromEarlierParameter()) { + // [temp.deduct.general#3] + // When all template arguments have been deduced + // or obtained from default template arguments, all uses of template + // parameters in the template parameter list of the template are + // replaced with the corresponding deduced or default argument values + // + // If we have a trailing parameter pack, that has been deduced + // previously we substitute the pack here in a similar fashion as + // above with the trailing parameter packs. The main difference here is + // that, in this case we are not processing all of the remaining + // arguments. We are only process as many arguments as much we have in ---------------- cor3ntin wrote:
```suggestion // arguments. We are only process as many arguments as we have in ``` https://github.com/llvm/llvm-project/pull/79371 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits