Must check numeric_limits<charT>::is_specialized before using other members!

[SVN r28527]
This commit is contained in:
John Maddock
2005-04-29 15:04:06 +00:00
parent 90560a3278
commit 774981bb52

View File

@ -1395,7 +1395,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
int i = this->m_traits.toi(m_position, m_end, 16);
if((m_position == m_end)
|| (i < 0)
|| (i > (std::numeric_limits<charT>::max)())
|| ((std::numeric_limits<charT>::is_specialized) && (i > (std::numeric_limits<charT>::max)()))
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
{
fail(regex_constants::error_badbrace, m_position - m_base);