Recently I faced a problem where I needed to make two passes over a vector, one iterating in a forwards direction and one in reverse. This is a simple task if you use the traditional loop style, but whenever I can I prefer to use C++11’s range-based for loop for the primary reason that it […]