TLDR: godbolt links: Clang Gcc Intro If there is one thing that it’s easy to do with C style loops and not as easy with modern C++, it’s keeping the loop variable around while we are accessing the elements of a container. The C way, and arguably the best way, is the usual On the […]