[clang] [clang-tools-extra] [Clang][C++29] Template pack indexing (PR #218738)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 26 05:30:03 PDT 2026


================
@@ -482,6 +507,56 @@ class DeducedTemplateStorage : public UncommonTemplateNameStorage,
                       TemplateName Underlying, const DefaultArguments &DefArgs);
 };
 
+/// A structure for storing a pack-index-template-name ([temp.names]).
+///
+/// C++29 [temp.names]p1:
+///   pack-index-template-name:
+///     simple-template-name ... [ constant-expression ]
+class PackIndexingTemplateStorage final
+    : public UncommonTemplateNameStorage,
+      public llvm::FoldingSetNode,
+      private llvm::TrailingObjects<PackIndexingTemplateStorage, TemplateName> {
+  friend class ASTContext;
+  friend TrailingObjects;
+
+  TemplateName Pattern;
+  Expr *IndexExpr;
+  bool FullySubstituted;
----------------
cor3ntin wrote:

I'm not sure this is an improvements, but... why not

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


More information about the cfe-commits mailing list