3:05 PM
@geza: "Here, at i!=input.end(), iterator must read from input" Streams can already tell when they're at the end of file or not. You would simply use that mechanism to determine whether an iterator is at the end.
So there is no need to store anything which is not already stored by the stream referenced by the iterator.
Also, I've come to realize that I was wrong earlier; making iterators store a value is actually better than returning it. Why? Because of memory allocations.
Consider an InputIterator whose
value_type
is a string
, like your line iterator. Each iteration will store a new value in that string
, but it will always be reusing the same object. This means that it can reuse the same allocated string buffer.
« first day (14 days earlier) ← previous day last day (15 days later) »
Transcript for
Sep16
Sep '1730
Oct15
Discussion between Nicol Bolas and geza
Imported from a comment discussion on softwareengineering.stac...