Let's talk about parameter packs

I work on a few projects that are good targets for parameter packs. Things around testing, command line tooling, etc. It is almost always a struggle against the compiler. Parameter packs are more crash prone than any other language feature I touch.

I’ve reported a few of these crashes over the years, but it seems like they just keep coming. I’m even seeing regressions. This issue was marked fixed, but it looks like it’s crashing again (or maybe it always crashed) on main. I’m starting to feel like this isn’t an issue that will get resolved with one more bug report. There’s something very wrong here.

I started looking into one of them, and I have a fix working, but it got me wondering why parameter packs are so problematic. What do folks who are more familiar with this area of the codebase feel is the root cause?

4 Likes