Table of Contents
Previous Section Next Section

equal_range

template <class ForIter, class T>    pair<ForIter, ForIter> equal_range(ForIter start, 
                                       ForIter end, const T &val);
template <class ForIter, class T, class Comp>
    pair<ForIter, ForIter> equal_range(ForIter start, ForIter end,
                                       const T &val, Comp cmpfn);

The equal_range( ) algorithm returns a range in which an element can be inserted into a sequence without disrupting the ordering of the sequence. The region in which to search for such a range is specified by start and end. The value is passed in val. To specify your own search criteria, specify the comparison function cmpfn.

The template class pair is a utility class that can hold a pair of objects in its first and second members.


Table of Contents
Previous Section Next Section