fixed the empty string handling for the split iterator

[SVN r66220]
This commit is contained in:
Pavol Droba
2010-10-27 20:40:37 +00:00
parent 62df1eb048
commit 3b76763807

View File

@ -258,9 +258,13 @@ namespace boost {
m_Next(Begin),
m_End(End),
m_bEof(false)
{
// force the correct behavior for empty sequences and yield at least one token
if(Begin!=End)
{
increment();
}
}
//! Constructor
/*!
Construct new split_iterator for a given finder
@ -278,8 +282,12 @@ namespace boost {
m_Next=::boost::begin(lit_col);
m_End=::boost::end(lit_col);
// force the correct behavior for empty sequences and yield at least one token
if(m_Next!=m_End)
{
increment();
}
}
private: