diff --git a/include/boost/re_detail/regex_compile.hpp b/include/boost/re_detail/regex_compile.hpp index 76500910..bea3d1f4 100644 --- a/include/boost/re_detail/regex_compile.hpp +++ b/include/boost/re_detail/regex_compile.hpp @@ -1924,6 +1924,7 @@ unsigned int BOOST_RE_CALL reg_expression::fixup_leadi const charT* p2 = _leading_string + _leading_string_len; pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator(_flags®base::icase, &traits_inst), data.allocator()); } + leading_lit = false; break; case re_detail::syntax_element_wild: ++len; diff --git a/include/boost/regex.hpp b/include/boost/regex.hpp index f4d030a9..e2ffc3e3 100644 --- a/include/boost/regex.hpp +++ b/include/boost/regex.hpp @@ -30,14 +30,14 @@ #include -#ifdef BOOST_RE_DEBUG -# include -#endif - #ifdef __cplusplus // what follows is all C++ don't include in C builds!! +#ifdef BOOST_RE_DEBUG +# include +#endif + #include #include #if !defined(BOOST_RE_NO_TYPEINFO) @@ -363,9 +363,15 @@ struct regex_iterator_traits { typedef typename T::iterator_category iterator_category; typedef typename T::value_type value_type; +#ifndef BOOST_MSVC typedef typename T::difference_type difference_type; typedef typename T::pointer pointer; typedef typename T::reference reference; +#else + typedef std::ptrdiff_t difference_type; + typedef value_type* pointer; + typedef value_type& reference; +#endif }; template @@ -1467,5 +1473,6 @@ typedef match_results wcmatch; +