• Both forms return the position of the first element of the first subrange matching the range
[searchBeg,searchEnd) in the range [beg,end).
• In the first form, the elements of the subrange have to be equal to the elements of the whole
range.
• In the second form, for every comparison between elements, the call of the binary predicate
op(elem,searchElem)
has to yield true.
• Both forms return end if no matching elements are found.
• Note that op should not change its state during a function call. See Section 10.1.4, page 483, for
details.
• op should not modify the passed arguments.
• See Section 6.4.1, page 203, for a discussion of how to find a subrange for which you know only
the first and the last elements.
• Complexity: linear (at most, numElems*numSearchElems comparisons or calls of op(), respectively)