From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2006-12-07 03:46:35
Nemanja Trifunovic <nemanja_trifunovic_at_[hidden]> writes:
>> Just because the vast majority of sequences will be random access doesn't
>> we should limit ourselves to that, when it is so easy to allow the use of
>> Forward Iterators.
> Bidirectional maybe, but using a forward iterator would break some important
> functionality: for instance, if an invalid sequence is detected, we step back
> to the beginning of the sequence before reporting the error.
Forward Iterators are copyable, so you can do this by keeping a copy of the
beginning of the sequence, and returning that on error.
-- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk