================
@@ -507,10 +507,62 @@ static TemplateDeductionResult 
DeduceNonTypeTemplateArgument(
       S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
 }
 
+static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A,
+                                          TemplateArgument Default) {
+  switch (A->getKind()) {
+  case Decl::TemplateTypeParm: {
+    auto *T = cast<TemplateTypeParmDecl>(A);
+    // FIXME: DefaultArgument can't represent a pack.
+    if (T->isParameterPack())
----------------
mizvekov wrote:

I see.

The code I posted was an attempt to construct such an example, where a pack 
doesn't need to be defaulted as-written for the proposed changes in the rules 
to have an effect. Except that example hits the wall at something else first, 
and I haven't fully investigated that. I haven't excluded the possibility that 
such an example could be constructed yet.

So when I proposed that provisional wording, I didn't exclude packs from the 
equation. I don't see a reason to, as without excluding them, the rules stay 
simpler and more general and should still work.

If we want to exclude them for implementation efficiency reasons, we could, as 
presumably it could still work as-if.

https://github.com/llvm/llvm-project/pull/89807
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to