Character classification functions (isspace, isalnum) are undefined for signed chars

Convert them to int using char_traits or static_cast to unsigned char
This commit is contained in:
Christopher Blaesius
2018-03-06 12:24:40 +01:00
committed by Howard Hinnant
parent 0197889505
commit 07876e4433

View File

@@ -7180,7 +7180,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
}
else // !command
{
if (isspace(*fmt))
if (isspace(static_cast<unsigned char>(*fmt)))
ws(is); // space matches 0 or more white space characters
else
read(is, *fmt);