C++ Standard Library equal_range() Sample

Description

equal_range() finds a range of equal elements in a sorted sequence, and returns iterators that delimit the range.

Declaration

	template <class For, class T>
	    pair<For, For> equal_range(For, For, const T&);
	template <class For, class T, class Cmp>
	    pair<For, For> equal_range(For, For, const T&, Cmp);

Concept

The range of elements equal to 59 or -59 is computed and displayed. A user-defined comparison function is supplied, that overrides the default use of <.

Special Notes:

equal_range() is equivalent to calling make_pair() on the results of lower_bound() and upper_bound() for a given iterator range.

Supported
Supported
Supported