From 9e9fc27dc666a935976e39e6c7f8cd6171117a51 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 10 Jun 2005 10:07:49 +0000 Subject: [PATCH] Apply patches to regex_iteraor/regex_token_iterator to the unicode iterators as well. [SVN r29512] --- include/boost/regex/v4/u32regex_iterator.hpp | 2 ++ include/boost/regex/v4/u32regex_token_iterator.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/regex/v4/u32regex_iterator.hpp b/include/boost/regex/v4/u32regex_iterator.hpp index ae660cec..950aa423 100644 --- a/include/boost/regex/v4/u32regex_iterator.hpp +++ b/include/boost/regex/v4/u32regex_iterator.hpp @@ -59,6 +59,8 @@ public: match_flag_type f(flags); if(!what.length()) f |= regex_constants::match_not_initial_null; + if(base != next_start) + f |= regex_constants::match_not_bob; bool result = u32regex_search(next_start, end, what, re, f); if(result) what.set_base(base); diff --git a/include/boost/regex/v4/u32regex_token_iterator.hpp b/include/boost/regex/v4/u32regex_token_iterator.hpp index d9f1ee48..58d1d046 100644 --- a/include/boost/regex/v4/u32regex_token_iterator.hpp +++ b/include/boost/regex/v4/u32regex_token_iterator.hpp @@ -130,7 +130,7 @@ public: return true; } if(what.prefix().first != what[0].second) - flags |= match_prev_avail; + flags |= match_prev_avail | regex_constants::match_not_bob; BidirectionalIterator last_end(what[0].second); if(u32regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags))) {