[clang] [Clang] Diagnose unexpanded packs for NTTP type constraints (PR #121296)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 31 03:19:53 PST 2024


================
@@ -857,7 +857,8 @@ class PackDeductionScope {
       if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(
               TemplateParams->getParam(Index))) {
         if (!NTTP->isExpandedParameterPack())
-          if (auto *Expansion = dyn_cast<PackExpansionType>(NTTP->getType()))
+          if (auto *Expansion = dyn_cast<PackExpansionType>(
+                  S.Context.getUnconstrainedType(NTTP->getType())))
----------------
cor3ntin wrote:

Unclear. @zygoloid asked that exact question last year (https://lists.isocpp.org/core/2023/03/14099.php) but there are no replies yet

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


More information about the cfe-commits mailing list