diff --git a/include/boost/algorithm/string/find_iterator.hpp b/include/boost/algorithm/string/find_iterator.hpp index 07a909e..e8cede5 100644 --- a/include/boost/algorithm/string/find_iterator.hpp +++ b/include/boost/algorithm/string/find_iterator.hpp @@ -134,8 +134,10 @@ namespace boost { { if(m_Match.begin() == m_Match.end()) m_Match=this->do_find(m_Match.end(),m_End); - else - m_Match=this->do_find(m_Match.begin()+1,m_End); + else { + input_iterator_type last = m_Match.begin(); + m_Match=this->do_find(++last,m_End); + } } // comparison diff --git a/string/test/split_test.cpp b/string/test/split_test.cpp index 1f26141..429f3c4 100644 --- a/string/test/split_test.cpp +++ b/string/test/split_test.cpp @@ -181,12 +181,10 @@ void iterator_test() BOOST_CHECK(siter==split_iterator(siter)); BOOST_CHECK(siter==split_iterator()); -#if 0 // Make sure we work with forward iterators // See bug #7989 list l1; find_iterator::iterator> liter=make_find_iterator(l1, first_finder("xx")); -#endif } BOOST_AUTO_TEST_CASE( test_main )