Requirements on types
For the first version:
• InputIterator1 is a model of Input Iterator.
• InputIterator2 is a model of Input Iterator.
• T is a model of Assignable.
• If x is an object of type T, y is an object of InputIterator1's value type, and z is an object of InputIterator2's value type, then x + y * z is defined.
• The type of x + y * z is convertible to T.
For the second version:
• InputIterator1 is a model of Input Iterator.
• InputIterator2 is a model of Input Iterator.
• T is a model of Assignable.
• BinaryFunction1 is a model of Binary Function.
• BinaryFunction2 is a model of Binary Function.
• InputIterator1's value type is convertible to BinaryFunction2's first argument type.
• InputIterator2's value type is convertible to BinaryFunction2's second argument type.
• T is convertible to BinaryFunction1's first argument type.
• BinaryFunction2's return type is convertible to BinaryFunction1's second argument type.
• BinaryFunction1's return type is convertible to T.