I am digging around C++ I/O documentation.
I can find EOF definition in stdio.h of VC++ but can't find it in stdio.h of llvm https://github.com/llvm-mirror/libcxx/blob/master/include/stdio.h
By the way, from https://en.cppreference.com/w/cpp/string/char_traits it says
So for char, std::char_traits::eof returns EOF which is -1. Also from https://en.cppreference.com/w/cpp/string/char_traits/eof, it says :
Returns a value not equivalent to any valid value of type char_type.
So here's what I deduce: -1 is not a valid value of type char_type(char)?
How come? In VC++, char is signed, so -1 should be valid for char.
