Move c++20 initializers out of for statement
This does not work with gcc 4.8 so let us avoid it as the improvement is minimal.