From ff4eaacbc45bcf00bbb6284e38d454c508f9dc73 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 13 Dec 2009 11:40:28 +0000 Subject: [PATCH] Symbian patches. Fixes #3764. Fixes #3763. [SVN r58342] --- include/boost/regex/v4/basic_regex_parser.hpp | 6 +++--- include/boost/regex/v4/perl_matcher.hpp | 2 +- include/boost/regex/v4/regex_traits_defaults.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index 7e5e3732..c85ad9a5 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -195,8 +195,8 @@ void basic_regex_parser::fail(regex_constants::error_type error_c // Augment error message with the regular expression text: // if(start_pos == position) - start_pos = (std::max)(static_cast(0), position - 10); - std::ptrdiff_t end_pos = (std::min)(position + 10, m_end - m_base); + start_pos = (std::max)(static_cast(0), position - static_cast(10)); + std::ptrdiff_t end_pos = (std::min)(position + static_cast(10), static_cast(m_end - m_base)); if(error_code != regex_constants::error_empty) { if((start_pos != 0) || (end_pos != (m_end - m_base))) @@ -1683,7 +1683,7 @@ charT basic_regex_parser::unescape_character() } else { - std::ptrdiff_t len = (std::min)(static_cast(2), m_end - m_position); + std::ptrdiff_t len = (std::min)(static_cast(2), static_cast(m_end - m_position)); int i = this->m_traits.toi(m_position, m_position + len, 16); if((i < 0) || !valid_value(charT(0), i)) diff --git a/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index 726c2881..5bac21c0 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/boost/regex/v4/perl_matcher.hpp @@ -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); } -#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) inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask) { diff --git a/include/boost/regex/v4/regex_traits_defaults.hpp b/include/boost/regex/v4/regex_traits_defaults.hpp index a8361083..ca13f195 100644 --- a/include/boost/regex/v4/regex_traits_defaults.hpp +++ b/include/boost/regex/v4/regex_traits_defaults.hpp @@ -84,7 +84,7 @@ inline bool is_combining(unsigned char) { 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 template<> inline bool is_combining(wchar_t c)