Index: basic_regex_parser.hpp =================================================================== --- basic_regex_parser.hpp (revision 58325) +++ basic_regex_parser.hpp (working copy) @@ -195,8 +195,8 @@ // 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)))