From 42147c8385b79d6c3dd6ca9b348200790890c55f Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 9 Jun 2010 23:12:56 +0000 Subject: [PATCH] Copy m_bEof in the split_iterator copy constructor. Fixes #4271 [SVN r62696] --- include/boost/algorithm/string/find_iterator.hpp | 2 +- string/test/split_test.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/algorithm/string/find_iterator.hpp b/include/boost/algorithm/string/find_iterator.hpp index 4224a19..72696c7 100644 --- a/include/boost/algorithm/string/find_iterator.hpp +++ b/include/boost/algorithm/string/find_iterator.hpp @@ -240,7 +240,7 @@ namespace boost { m_Match(Other.m_Match), m_Next(Other.m_Next), m_End(Other.m_End), - m_bEof(false) + m_bEof(Other.m_bEof) {} //! Constructor diff --git a/string/test/split_test.cpp b/string/test/split_test.cpp index bb4e1a2..d85bce7 100644 --- a/string/test/split_test.cpp +++ b/string/test/split_test.cpp @@ -139,6 +139,7 @@ void iterator_test() ++siter; BOOST_CHECK(equals(*siter, "abb")); ++siter; + BOOST_CHECK(siter==split_iterator(siter)); BOOST_CHECK(siter==split_iterator()); }