News for hackers. Stuff that matters.
Re:C++26: Pack Indexing by spacechild1 on Friday January 24, 2025 @04:37PM (#42817159)
> right now I looks mutable, something like `for (constexpr size_t I : INPUT_COUNT)` might be better

I thought the same, but then you lose the ability to control the increment step. For example, one might want to iterate pairwise.

Regarding syntax, you could mandate that the loop variable has to be declared `constexpr` as well, which makes it clear that it can't be modified in the loop body.

Re:C++26: Pack Indexing by a_t48 on Friday January 24, 2025 @10:00PM (#42819074)
You could make a temporary or use some std::range/span helper. Double constexpr would work, too. Feels gross in the same way template template does.