
11 Dec
2004
11 Dec
'04
2:52 a.m.
Bob Bell wrote:
Hi-
I was wondering what the rationale was for boost::filter_iterator not modeling anything more than a forward traversal iterator.
Cost.
Recently I was trying to use filter_iterator in a situation where I needed bidirectional traversal, but got stymied by this. Is there something about the notion of filtering that precludes bidirectionality? Or is this something that could be made to work?
In order to be able to be bidirectional the filter iterator would need at least another member, the beginning of the sequence and another ctor parameter, again the beginning of the sequence. This is a non negligible cost that users that are ok with fwd iterators most likely don't want to pay. Regards Thomas -- Thomas Witt witt@acm.org