Describe the bug
blank returns true for '\r', '\n' ... it just works as an alias for std::ctype::space
From https://en.cppreference.com/w/cpp/string/byte/isblank
In the default C locale, only space (0x20) and horizontal tab (0x09) are classified as blank characters.
Command-line test case
C:\Temp>type main.cpp
#include <iostream>
#include <locale>
#include <cctype>
using namespace std;
int main()
{
cout << isblank('\n') << '\n';
cout << use_facet<ctype<char>>(locale("C")).is(ctype<char>::blank,
static_cast<unsigned char>('\n')) << '\n';
cout << use_facet<ctype<char>>(locale::classic()).is(ctype<char>::blank,
static_cast<unsigned char>('\n')) << '\n';
}
C:\Temp>cl /EHsc /W4 /WX main.cpp
cl /EHsc /W4 /WX main.cpp
Оптимизирующий компилятор Microsoft (R) C/C++ версии 19.27.29109 для x64
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
main.cpp
Microsoft (R) Incremental Linker Version 14.27.29109.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:main.exe
main.obj
C:\Temp>main.exe
0
1
1
Expected behavior
Should return 0 0 0
STL version
Microsoft Visual Studio Community 2019 Preview Version 16.7.0 Preview 6.0
Additional context
VSO-429255 / AB#429255 | DevCom-215436 DevCom-246252 DevCom-51443
Describe the bug
blank returns true for '\r', '\n' ... it just works as an alias for std::ctype::space
From https://en.cppreference.com/w/cpp/string/byte/isblank
Command-line test case
Expected behavior
Should return 0 0 0
STL version
Microsoft Visual Studio Community 2019 Preview Version 16.7.0 Preview 6.0Additional context
VSO-429255 / AB#429255 | DevCom-215436 DevCom-246252 DevCom-51443