From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-05-28 06:53:22
Gennadiy Rozental wrote:
> > My line_iterator declares two constructors and 'get'. Yours defines, for
> > stream_line_iterator_impl: one constructor, 'initialize', 'get',
> > 'dereference' and 'equal' plus one constructor in
> > This is 1 class and 3 member functions vs. 2 classes and 6 member
> I do not put value directly into input_iterator_facade since it too much an
> assumption. So I need to method dereference in Policy.
> In your implementation input iterators almost never equal. Even though it
> is true in many cases. I still believe you couldn't assume it is always the
> case. So I need method equal in Policy.
Do you have a case for 'equal'? Since you can't use input iterators for
multi-pass algorithm, I cannot imagine a case where comparing two
non-past-the end iterators is desirable.
> Actually my implementation was written couple years ago for classic
> iostreams. I forgot about getline version you are using when ported for
> Boost.Test needs. Once I switch to standard getline, I don't actually need
> method initialize anymore for my usage cases. I still not sure is it
> required in general. BTW don't you missed to call get() in line_iterator
> The question remains does we need all that flexibility. I believe - yes.
I guess we're back to your old disagreements about flexibility. Flexibility is
fine, but it adds complexity, both for implementors and the user, so
flexibility should be added only when absolutely necessary. The eof_iterator
is intented to be as simple as possible.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk