[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 10 07:36:38 PST 2024


================
@@ -1713,6 +1716,11 @@ class ASTContext : public RefCountedBase<ASTContext> {
   /// C++11 decltype.
   QualType getDecltypeType(Expr *e, QualType UnderlyingType) const;
 
+  QualType getPackIndexingType(QualType Pattern, Expr *IndexExpr,
+                               bool FullyExpanded = false,
+                               ArrayRef<QualType> Expansions = {},
+                               int Index = -1) const;
----------------
cor3ntin wrote:

I think we really want it there.
We need to be able to get to the selected type to determine the canonical type.

I have compromised by removing it from PackIndexingExpr/PackIndexingType, that way it is not serialized

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


More information about the cfe-commits mailing list