more post submission fixes for regex

[SVN r7855]
This commit is contained in:
John Maddock
2000-09-27 12:06:41 +00:00
parent a47bcdb944
commit c9cfe5a906
2 changed files with 12 additions and 4 deletions

View File

@ -1924,6 +1924,7 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_leadi
const charT* p2 = _leading_string + _leading_string_len; const charT* p2 = _leading_string + _leading_string_len;
pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator<traits>(_flags&regbase::icase, &traits_inst), data.allocator()); pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator<traits>(_flags&regbase::icase, &traits_inst), data.allocator());
} }
leading_lit = false;
break; break;
case re_detail::syntax_element_wild: case re_detail::syntax_element_wild:
++len; ++len;

View File

@ -30,14 +30,14 @@
#include <boost/cregex.hpp> #include <boost/cregex.hpp>
#ifdef BOOST_RE_DEBUG
# include <iosfwd>
#endif
#ifdef __cplusplus #ifdef __cplusplus
// what follows is all C++ don't include in C builds!! // what follows is all C++ don't include in C builds!!
#ifdef BOOST_RE_DEBUG
# include <iosfwd>
#endif
#include <new> #include <new>
#include <boost/re_detail/regex_config.hpp> #include <boost/re_detail/regex_config.hpp>
#if !defined(BOOST_RE_NO_TYPEINFO) #if !defined(BOOST_RE_NO_TYPEINFO)
@ -363,9 +363,15 @@ struct regex_iterator_traits
{ {
typedef typename T::iterator_category iterator_category; typedef typename T::iterator_category iterator_category;
typedef typename T::value_type value_type; typedef typename T::value_type value_type;
#ifndef BOOST_MSVC
typedef typename T::difference_type difference_type; typedef typename T::difference_type difference_type;
typedef typename T::pointer pointer; typedef typename T::pointer pointer;
typedef typename T::reference reference; typedef typename T::reference reference;
#else
typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef value_type& reference;
#endif
}; };
template <class T> template <class T>
@ -1467,5 +1473,6 @@ typedef match_results<const wchar_t*> wcmatch;