Michael Marcin wrote:
For lists that cycle through the available items when operator++ is called on the last iterator before end that satisfies the predicate it the iterator should point to the first element that satisfies the predicate. When operator-- is called on that iterator it should point to the last iterator before end again.
See: http://tinyurl.com/2o3ch4 or: http://tinyurl.com/2bgjfv Then you might want to apply boost::filter_iterator.
For lists that traverse the available items without cycling when operator++ is called on the last iterator before end that satisfies the predicate the iterator should point to the same element. When operator-- is called on the first iterator that satisfies the predicate the iterator should point to the same element.
I haven't ever seen such one, AFAIK. Regards, -- Shunsuke Sogame