STL Functions

The STL algorithm library, supported by the algorithm and numeric header files, provides a large number of non-member, iterator-based template functions. As discussed in Chapter 15, the template parameter names are chosen to indicate what concept particular parameters should model. For example, ForwardIterator is used to indicate that a parameter should, at the minimum, model the requirements of a forward iterator, and Predicate is used to indicate a parameter that should be a function object with one argument and a bool return value. The standard divides the algorithms into four groups: non-modifying sequence operations, mutating sequence operations, sorting and related operators, and numeric operations. The term sequence operation ...

Get The Waite Group's C++ Primer Plus, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.