danmar / simplecpp

C++ preprocessor
BSD Zero Clause License
209 stars 83 forks source link

replace 'isspace' with 'std::isspace' #370

Closed danmar closed 1 month ago

danmar commented 1 month ago

I have the feeling that isspace is not portable. We include cctype.

firewave commented 1 month ago

It should be. These C functions exists within and outside the namespace.

danmar commented 1 month ago

At least an old C++ Builder did not include ctype.h from cctype but well that was more than 10 years ago. I don't explicitly see that isspace is available in cctype in cppreference i.e. https://en.cppreference.com/w/c/string/byte/isspace.

firewave commented 1 month ago

Because you looked at the C standard description. See https://en.cppreference.com/w/cpp/string/byte/isspace for the C++ one.

danmar commented 1 month ago

yes as far as I understand that only mentions std::isspace .

I compare the text with https://en.cppreference.com/w/cpp/container/vector that does not always provide std:: explicitly.