Merge fixes from Trunk.

[SVN r81819]
This commit is contained in:
John Maddock
2012-12-10 13:18:45 +00:00
parent 1136748517
commit e70d3b6b4e
104 changed files with 3981 additions and 4328 deletions

View File

@ -20,6 +20,7 @@
#define BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/integer.hpp>
#ifndef BOOST_NO_STD_LOCALE
@ -107,12 +108,14 @@ template<class charT, class traits>
typename parser_buf<charT, traits>::pos_type
parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which)
{
typedef typename boost::int_t<sizeof(way) * CHAR_BIT>::least cast_type;
if(which & ::std::ios_base::out)
return pos_type(off_type(-1));
std::ptrdiff_t size = this->egptr() - this->eback();
std::ptrdiff_t pos = this->gptr() - this->eback();
charT* g = this->eback();
switch(way)
switch(static_cast<cast_type>(way))
{
case ::std::ios_base::beg:
if((off < 0) || (off > size))

View File

@ -121,7 +121,7 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::
#undef BOOST_REGEX_TEMPLATE_DECL
#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_EXTERN_TEMPLATE)
#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE)
# ifndef BOOST_REGEX_INSTANTIATE
# ifdef __GNUC__

View File

@ -1268,6 +1268,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
// remember where we got to if this is a leading repeat:
if((rep->leading) && (count < rep->max))
restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state: