|
22 | 22 | #ifdef BOOST_MSVC |
23 | 23 | #pragma warning(push) |
24 | 24 | #pragma warning(disable: 4103) |
| 25 | +#if BOOST_MSVC >= 1800 |
| 26 | +#pragma warning(disable: 26812) |
| 27 | +#endif |
25 | 28 | #endif |
26 | 29 | #ifdef BOOST_HAS_ABI_HEADERS |
27 | 30 | # include BOOST_ABI_PREFIX |
@@ -124,7 +127,8 @@ class basic_regex_parser : public basic_regex_creator<charT, traits> |
124 | 127 |
|
125 | 128 | template <class charT, class traits> |
126 | 129 | basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data) |
127 | | - : basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0) |
| 130 | + : basic_regex_creator<charT, traits>(data), m_parser_proc(), m_base(0), m_end(0), m_position(0), |
| 131 | + m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0) |
128 | 132 | { |
129 | 133 | } |
130 | 134 |
|
@@ -321,6 +325,12 @@ bool basic_regex_parser<charT, traits>::parse_basic() |
321 | 325 | return true; |
322 | 326 | } |
323 | 327 |
|
| 328 | +#ifdef BOOST_MSVC |
| 329 | +# pragma warning(push) |
| 330 | +#if BOOST_MSVC >= 1800 |
| 331 | +#pragma warning(disable:26812) |
| 332 | +#endif |
| 333 | +#endif |
324 | 334 | template <class charT, class traits> |
325 | 335 | bool basic_regex_parser<charT, traits>::parse_extended() |
326 | 336 | { |
@@ -409,6 +419,9 @@ bool basic_regex_parser<charT, traits>::parse_extended() |
409 | 419 | return result; |
410 | 420 | } |
411 | 421 | #ifdef BOOST_MSVC |
| 422 | +# pragma warning(pop) |
| 423 | +#endif |
| 424 | +#ifdef BOOST_MSVC |
412 | 425 | #pragma warning(pop) |
413 | 426 | #endif |
414 | 427 |
|
@@ -911,7 +924,7 @@ bool basic_regex_parser<charT, traits>::parse_extended_escape() |
911 | 924 | pc = m_position; |
912 | 925 | } |
913 | 926 | if(negative) |
914 | | - i = 1 + m_mark_count - i; |
| 927 | + i = 1 + (static_cast<boost::intmax_t>(m_mark_count) - i); |
915 | 928 | if(((i < hash_value_mask) && (i > 0) && (this->m_backrefs.test(i))) || ((i >= hash_value_mask) && (this->m_pdata->get_id(i) > 0) && (this->m_backrefs.test(this->m_pdata->get_id(i))))) |
916 | 929 | { |
917 | 930 | m_position = pc; |
@@ -2132,7 +2145,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension() |
2132 | 2145 | // Oops not a relative recursion at all, but a (?-imsx) group: |
2133 | 2146 | goto option_group_jump; |
2134 | 2147 | } |
2135 | | - v = m_mark_count + 1 - v; |
| 2148 | + v = static_cast<boost::intmax_t>(m_mark_count) + 1 - v; |
2136 | 2149 | if(v <= 0) |
2137 | 2150 | { |
2138 | 2151 | // Rewind to start of (? sequence: |
@@ -2746,6 +2759,12 @@ bool basic_regex_parser<charT, traits>::match_verb(const char* verb) |
2746 | 2759 | return true; |
2747 | 2760 | } |
2748 | 2761 |
|
| 2762 | +#ifdef BOOST_MSVC |
| 2763 | +# pragma warning(push) |
| 2764 | +#if BOOST_MSVC >= 1800 |
| 2765 | +#pragma warning(disable:26812) |
| 2766 | +#endif |
| 2767 | +#endif |
2749 | 2768 | template <class charT, class traits> |
2750 | 2769 | bool basic_regex_parser<charT, traits>::parse_perl_verb() |
2751 | 2770 | { |
@@ -2914,6 +2933,9 @@ bool basic_regex_parser<charT, traits>::parse_perl_verb() |
2914 | 2933 | fail(regex_constants::error_perl_extension, m_position - m_base); |
2915 | 2934 | return false; |
2916 | 2935 | } |
| 2936 | +#ifdef BOOST_MSVC |
| 2937 | +# pragma warning(pop) |
| 2938 | +#endif |
2917 | 2939 |
|
2918 | 2940 | template <class charT, class traits> |
2919 | 2941 | bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate) |
|
0 commit comments