Next: High Integrity CPP Rule 17.19  Up: 17 Standard Template Library (STL)  Previous: High Integrity CPP Rule 17.17  Contents

High Integrity CPP Guideline 17.18   Use STL algorithms rather than hand-written loops.

Justification

Implementations may optimize algorithms for particular container types to improve efficiency. Code using algorithms is generally clearer, more straightforward, less error prone, and easier to maintain.

See also

Rule 17.19

Reference

Effective STL Item 43;


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP