Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48661 - in trunk: boost/xpressive/detail/core/matcher libs/xpressive/test
From: eric_at_[hidden]
Date: 2008-09-08 00:28:11


Author: eric_niebler
Date: 2008-09-08 00:28:09 EDT (Mon, 08 Sep 2008)
New Revision: 48661
URL: http://svn.boost.org/trac/boost/changeset/48661

Log:
past-the-end iterator, fixes #2296
Text files modified:
   trunk/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp | 3 +--
   trunk/libs/xpressive/test/regress.txt | 6 ++++++
   2 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp
==============================================================================
--- trunk/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp (original)
+++ trunk/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp 2008-09-08 00:28:09 EDT (Mon, 08 Sep 2008)
@@ -177,8 +177,7 @@
             {
                 if(this->leading_)
                 {
- // BUGBUG
- state.next_search_ = boost::next(tmp);
+ state.next_search_ = (tmp == state.end_) ? tmp : boost::next(tmp);
                 }
                 return false;
             }

Modified: trunk/libs/xpressive/test/regress.txt
==============================================================================
--- trunk/libs/xpressive/test/regress.txt (original)
+++ trunk/libs/xpressive/test/regress.txt 2008-09-08 00:28:09 EDT (Mon, 08 Sep 2008)
@@ -3748,3 +3748,9 @@
 br0=HighLight
 br1=Blow
 [end]
+
+[track2296]
+str=> ""
+pat=(?P<f>.+):(?P<l>[0-9]+):((?P<c>[0-9]+):)?.*
+flg=
+[end]


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