Prefer algorithms to loops. Stroustrup00] §18.12
Algorithms are loopsonly better. Algorithms are the "patterns" of loops, adding far more semantic content and richness than a naked
for would
do alone. Of course, the moment you start using algorithms you'll also start using function objects and predicates; write them correctly, and use them well.Item 83: Use a checked STL implementation.