There are requirements for input iterators, this manual, does not attempt to list them all.
Algorithms on input iterators should never attempt to pass through the same iterator more than once.