Usage examples of STL algorithms versus handcrafted for-loops

To state the importance of using algorithms rather than for-loops, we'd like to show a few examples of not-so-obvious problems that one may bump into when using handcrafted for-loops rather than STL algorithms.

Get C++ High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.