Requirements on types
For the first version:
• ForwardIterator is a model of Forward Iterator.
• Integer is an integral type.
• T is a model of EqualityComparable.
• ForwardIterator's value type is a model of EqualityComparable.
• Objects of ForwardIterator's value type can be compared for equality with Objects of type T.
For the second version:
• ForwardIterator is a model of Forward Iterator.
• Integer is an integral type.
• T is a model of EqualityComparable.
• BinaryPredicate is a model of Binary Predicate.
• ForwardIterator's value type is convertible to BinaryPredicate's first argument type.
• T is convertible to BinaryPredicate's second argument type.