[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)
Nikolas Klauser via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 10 08:05:56 PST 2024
================
@@ -978,6 +978,20 @@ bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {
} else {
break;
}
+ // Pack indexing
+ if (getLangOpts().CPlusPlus26 && Tok.is(tok::ellipsis) &&
----------------
philnik777 wrote:
> @philnik777 This would require GCC to also support that as an extension in C++11 (and above). Otherwise we wouldn't be able to use it in our tuple implementation.
Yeah, obviously. But if one implementation adds it, it becomes a lot more likely that others do it too. I also suspect that libstdc++ may also really like this.
> Would a change like that be possible without being an ABI break?
I don't know, but IMO it would even be worth just adding it in ABIv2 if we can get it as an extension. I expect this to bring a _lot_ of improvement in terms of compile times and debug binary size.
https://github.com/llvm/llvm-project/pull/72644
More information about the cfe-commits
mailing list