mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 14:22:08 +02:00
@ -195,8 +195,8 @@ void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_c
|
|||||||
// Augment error message with the regular expression text:
|
// Augment error message with the regular expression text:
|
||||||
//
|
//
|
||||||
if(start_pos == position)
|
if(start_pos == position)
|
||||||
start_pos = (std::max)(static_cast<std::ptrdiff_t>(0), position - 10);
|
start_pos = (std::max)(static_cast<std::ptrdiff_t>(0), position - static_cast<std::ptrdiff_t>(10));
|
||||||
std::ptrdiff_t end_pos = (std::min)(position + 10, m_end - m_base);
|
std::ptrdiff_t end_pos = (std::min)(position + static_cast<std::ptrdiff_t>(10), static_cast<std::ptrdiff_t>(m_end - m_base));
|
||||||
if(error_code != regex_constants::error_empty)
|
if(error_code != regex_constants::error_empty)
|
||||||
{
|
{
|
||||||
if((start_pos != 0) || (end_pos != (m_end - m_base)))
|
if((start_pos != 0) || (end_pos != (m_end - m_base)))
|
||||||
@ -1683,7 +1683,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), m_end - m_position);
|
std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), static_cast<std::ptrdiff_t>(m_end - m_position));
|
||||||
int i = this->m_traits.toi(m_position, m_position + len, 16);
|
int i = this->m_traits.toi(m_position, m_position + len, 16);
|
||||||
if((i < 0)
|
if((i < 0)
|
||||||
|| !valid_value(charT(0), i))
|
|| !valid_value(charT(0), i))
|
||||||
|
@ -61,7 +61,7 @@ inline bool can_start(unsigned short c, const unsigned char* map, unsigned char
|
|||||||
{
|
{
|
||||||
return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
|
return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
|
||||||
}
|
}
|
||||||
#if !defined(__hpux) // WCHAR_MIN not usable in pp-directives.
|
#if !defined(__hpux) && !defined(__WINSCW__)// WCHAR_MIN not usable in pp-directives.
|
||||||
#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||||
inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
|
inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ inline bool is_combining<unsigned char>(unsigned char)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifndef __hpux // can't use WCHAR_MAX/MIN in pp-directives
|
#if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
template<>
|
template<>
|
||||||
inline bool is_combining<wchar_t>(wchar_t c)
|
inline bool is_combining<wchar_t>(wchar_t c)
|
||||||
|
Reference in New Issue
Block a user