On 2005-11-14,
fa********@cox.net <fa********@cox.net> wrote:
Evidently per the C++ standard, it is not possible to measure
the distance between two stream iterators, because two
non-end-of-stream iterators are equal when they are constructed
from the same stream. I still don't quite understand why that
fact is true. But...
You may wish to try to implement your own istream_iterator-like
template that is a forward iterator instead of an input iterator.
If it turns out to be no trouble, then you'll have what you
wanted. If it turns out that you can't do it, then you'll be
enlightened. That's a win-win.
--
Neil Cerutti