]> git.lyx.org Git - lyx.git/blobdiff - 3rdparty/boost/boost/regex/v4/perl_matcher_non_recursive.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / regex / v4 / perl_matcher_non_recursive.hpp
index 3d89749d02055315d3ff4d6488a64629ff43928b..eb470a78d0825dfe88b653ef12a14fdac16c2c0d 100644 (file)
 #endif
 #ifdef BOOST_MSVC
 #  pragma warning(push)
-#  pragma warning(disable: 4800 4706)
+#  pragma warning(disable: 4706)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
 #endif
 
 namespace boost{
@@ -64,7 +67,7 @@ struct saved_matched_paren : public saved_state
 {
    int index;
    sub_match<BidiIterator> sub;
-   saved_matched_paren(int i, const sub_match<BidiIterator>& s) : saved_state(1), index(i), sub(s){};
+   saved_matched_paren(int i, const sub_match<BidiIterator>& s) : saved_state(1), index(i), sub(s){}
 };
 
 template <class BidiIterator>
@@ -72,7 +75,7 @@ struct saved_position : public saved_state
 {
    const re_syntax_base* pstate;
    BidiIterator position;
-   saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){};
+   saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){}
 };
 
 template <class BidiIterator>
@@ -80,7 +83,7 @@ struct saved_assertion : public saved_position<BidiIterator>
 {
    bool positive;
    saved_assertion(bool p, const re_syntax_base* ps, BidiIterator pos) 
-      : saved_position<BidiIterator>(ps, pos, saved_type_assertion), positive(p){};
+      : saved_position<BidiIterator>(ps, pos, saved_type_assertion), positive(p){}
 };
 
 template <class BidiIterator>
@@ -1797,7 +1800,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
    // Backtracking out of a recursion, we must pop state off the recursion
    // stack unconditionally to ensure matched pushes and pops:
    saved_state* pmp = static_cast<saved_state*>(m_backup_state);
-   if (!r)
+   if (!r && !recursion_stack.empty())
    {
       *m_presult = recursion_stack.back().results;
       position = recursion_stack.back().location_of_start;
@@ -1834,6 +1837,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_commit(bool b)
       // If we stop because we just unwound an assertion, put the
       // commit state back on the stack again:
       //
+      m_unwound_lookahead = false;
       saved_state* pmp = m_backup_state;
       --pmp;
       if(pmp < m_stack_base)