diff --git a/demo/regress/parse.cpp b/demo/regress/parse.cpp index 9f3bfe83..918ab897 100644 --- a/demo/regress/parse.cpp +++ b/demo/regress/parse.cpp @@ -298,7 +298,7 @@ void expand_escapes(string_type& s) int val = 0; unsigned int pos = i; ++i; - while( (s[i] >= BOOST_RE_STR('0')) && (s[i] <= BOOST_RE_STR('9')) && (i < s.size())) + while((i < s.size()) && (s[i] >= BOOST_RE_STR('0')) && (s[i] <= BOOST_RE_STR('9'))) { val *= 10; val += s[i] - BOOST_RE_STR('0'); diff --git a/demo/regress/regress.h b/demo/regress/regress.h index 806905ae..f7db5dae 100644 --- a/demo/regress/regress.h +++ b/demo/regress/regress.h @@ -201,6 +201,13 @@ struct debug_iterator : public BOOST_RE_RA_ITERATOR(T, std::ptrdiff_t) debug_iterator() : cur(), first(), last() {} debug_iterator(const debug_iterator& x) : cur(x.cur), first(x.first), last(x.last) {} + debug_iterator& operator=(const debug_iterator& x) + { + cur = x.cur; + first = x.first; + last = x.last; + return *this; + } reference operator*() const { diff --git a/demo/regress/tests.cpp b/demo/regress/tests.cpp index 06e7c262..a2f89531 100644 --- a/demo/regress/tests.cpp +++ b/demo/regress/tests.cpp @@ -299,7 +299,7 @@ void cpp_tests(const reg_expression& e, bool recurse = true) (m[-1].first - x) << "," << (m[-1].second - x) << ") expected (0" << "," << matches[0] << ")" << endl; } - if(((m[-2].first != m[0].second) || (m[-2].second != y)) && ((flags[3] & match_partial) == 0)) + if(((flags[3] & match_partial) == 0) && ((m[-2].first != m[0].second) || (m[-2].second != y))) { begin_error(); cout << "regex++ API result mismatch in $' (match -2), found (" << diff --git a/src/c_regex_traits.cpp b/src/c_regex_traits.cpp index c8400ff4..735b55b9 100644 --- a/src/c_regex_traits.cpp +++ b/src/c_regex_traits.cpp @@ -559,7 +559,7 @@ bool BOOST_RE_CALL c_regex_traits::lookup_collatename(std::basic_string scoped_array buf(new char[len]); strnarrow(buf.get(), len, s.c_str()); std::string t_out; - bool result = do_lookup_collate(t_out, buf.get()); + bool result = base_type::do_lookup_collate(t_out, buf.get()); if(t_out.size() == 0) result = false; if(result) {