Finds the range of common elements for two sets of iterators.
This function finds the first contiguous set of elements equivalent in two lists. Two pairs of iterators are returned via output parameters common1
and common2
. These two sets of output iterators point to the first range of contiguous, equivalent elements in the two lists. If no common elements far found; then common1.first
and common1.second
both are equal to last1, and likewise for common2.
- Template Parameters
-
InIter1 | The input iterator type for the first range of elements. |
InIter2 | The input iterator type for the second range of elements. |
- Parameters
-
[in] | first1 | An input iterator pointing to the beginning of the first range of elements to be compared. |
[in] | last1 | An input iterator pointing to one past the end of the first range of elements to be compared. |
[in] | first2 | An input iterator pointing to the beginning of the second range of elements to be compared. |
[in] | last2 | An input iterator pointing to one past the end of the second range of elements to be compared. |
[out] | common1 | A pair of iterators where common1.first points to the first common element, and common1.second points to one past the last common element in the first list. |
[out] | common2 | A pair of iterators where common1.first points to the first common element, and common1.second points to one past the last common element in the second list. |
Definition at line 70 of file index_list.h.