[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 10 05:53:01 PST 2024
================
@@ -5697,6 +5698,39 @@ QualType ASTContext::getDecltypeType(Expr *e, QualType UnderlyingType) const {
return QualType(dt, 0);
}
+QualType ASTContext::getPackIndexingType(QualType Pattern, Expr *IndexExpr,
+ bool FullyExpanded,
+ ArrayRef<QualType> Expansions,
+ int Index) const {
+ QualType Canonical;
+ if (FullyExpanded && Index != -1) {
----------------
cor3ntin wrote:
given ```cpp
auto f(auto... a) -> decltype(a...[0]);
auto g(auto b...) {
return f<int>(b...);
}
```
We end up in a situation where we have some expansion for `a...` because explicit parameters (int) are substituted, but we still have a pack.
We seem to use "Partially substituted" in some other places, would that be more clear?
https://github.com/llvm/llvm-project/pull/72644
More information about the cfe-commits
mailing list