
Hi, I think I've found an issue with boost::filter_iterator when decrementing a valid iterator without having any predicate evaluating to true on its way back. filter_iterator.hpp line# 93 states void decrement() { while(!this->m_predicate(*--(this->base_reference()))){}; } which will ?clearly? pass beyond the initial start iterator if no predicate evaluates to true. Is it a requirement for the iterator being adapted by filter_iterator to catch decrements past the containers begin range? The following test will iterate 'iter' past containers begin iterator which will trigger a debug assertion on MSVC. template<class _Iterator> void dec_iterator(_Iterator iter) { BOOST_CHECK(*iter == 2); --iter; // iterates past begin } BOOST_AUTO_TEST_CASE(test_filter_iterator) { using namespace boost::assign; typedef std::vector<int> container_type; container_type values = list_of(0)(1)(2); dec_iterator(boost::make_filter_iterator(std::bind2nd(std::greater<int>(), 1), values.begin(), values.end())); } Please help me clarifying this issue. Best regards, christoph