[Home]STLAlgorithmExtensions/EqualAlgorithm

BOOST WIKI | STLAlgorithmExtensions | RecentChanges | Preferences | Page List | Links List

Difference (from prior major revision) (no other diffs)

Added: 18a19,20

Personally I often need something like 'prefix', it returns wether or not the first sequence is a prefix of the second.

This is a version of [std::equal] where both the start and end of the second range is specified. The function will return false if the ranges are not the same length.
template <class InputIterator1, class InputIterator2>
bool equal(InputIterator1 first1, InputIterator1 last1,
           InputIterator2 first2, InputIterator2 last2);

template <class InputIterator1, class InputIterator2, class BinaryPredicate>
bool equal(InputIterator1 first1, InputIterator1 last1,
           InputIterator2 first2, InputIterator2 last2,
           BinaryPredicate binary_pred);

Question (Pavol Droba) ?

This algorithm is needed by the string_algo library. Because it is missing now, it will be implemented there. Should it be provided as public, or it will be provided by some other lib?

Personally I often need something like 'prefix', it returns wether or not the first sequence is a prefix of the second.


BOOST WIKI | STLAlgorithmExtensions | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited October 27, 2003 4:12 am (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers