|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82788 - in trunk: boost/algorithm/string libs/algorithm/string/test
From: marshall_at_[hidden]
Date: 2013-02-08 12:32:07
Author: marshall
Date: 2013-02-08 12:32:05 EST (Fri, 08 Feb 2013)
New Revision: 82788
URL: http://svn.boost.org/trac/boost/changeset/82788
Log:
Make find_iterator work with forward iterators; refs #7989
Text files modified:
trunk/boost/algorithm/string/find_iterator.hpp | 6 ++++--
trunk/libs/algorithm/string/test/split_test.cpp | 2 --
2 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/boost/algorithm/string/find_iterator.hpp
==============================================================================
--- trunk/boost/algorithm/string/find_iterator.hpp (original)
+++ trunk/boost/algorithm/string/find_iterator.hpp 2013-02-08 12:32:05 EST (Fri, 08 Feb 2013)
@@ -134,8 +134,10 @@
{
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
Modified: trunk/libs/algorithm/string/test/split_test.cpp
==============================================================================
--- trunk/libs/algorithm/string/test/split_test.cpp (original)
+++ trunk/libs/algorithm/string/test/split_test.cpp 2013-02-08 12:32:05 EST (Fri, 08 Feb 2013)
@@ -181,12 +181,10 @@
BOOST_CHECK(siter==split_iterator<string::iterator>(siter));
BOOST_CHECK(siter==split_iterator<string::iterator>());
-#if 0
// Make sure we work with forward iterators
// See bug #7989
list<char> l1;
find_iterator<list<char>::iterator> liter=make_find_iterator(l1, first_finder("xx"));
-#endif
}
BOOST_AUTO_TEST_CASE( test_main )
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk