The range-for-loop is a very convenient replacement for the C-style for-loop.
However, range-for-loop can be cumbersome when accessing the original index or computing a target index.
The C++23 std::views::enumerate removes this problem by producing a range of tuples, where the i-th tuple consists of the value i and a reference to the i-th element of the source range.
Compiler Explorer link: https://compiler-explorer.com/z/84b6ns5hs