21 Mar
2017
21 Mar
'17
1:04 a.m.
On 2017-03-21 11:46, Vladimir Batov via Boost wrote:
On 2017-03-21 11:43, Gavin Lambert via Boost wrote:
... I haven't verified but presumably std::char_traits
::to_int_type() would convert correctly for input to std::isspace/iswspace. Thanks, Gavin, indeed I should have a dig in char_traits before re-inventing the wheel. Thanks.
Isn't funny? I went to cppreference.com and immediately bumped into the exact problem I am trying to address: struct ci_char_traits : public std::char_traits<char> { static bool eq(char c1, char c2) { return std::toupper(c1) == std::toupper(c2); } The example seems to ignore that char vs. "unsigned char" issue/vulnerability.