![]() |
TODO
The Standard Template Library provides a number of useful general-purpose algorithms that operate on sequences. They are defined in the standard header <algorithm>. These algorithms are iterator-based, meaning that sequences are specified using two iterators. Often, it is more convenient to use ranges instead of iterators. For instance, if you want to apply an algorithm to every element in a container, it's easier to simply pass the container instead of passing (container.begin(), container.end()). Also, if you are using the Range Adaptors, you don't want to have to declare a local variable to hold the adapted range because you don't know its type. Instead, you can adapt the range right in the call to a range-based algorithm, freeing you from having to know the type of the adapted range.
To best support range-based code, and to better leverage the composability of ranges, the Boost.range_ex library provides a complete set of range-based algorithms. You can find them in boost/range_ex/algorithm.hpp.
TODO
| Copyright © 2004 Eric Niebler |