This implementation is defined. The C ++ standard says absolutely nothing about streaming, so any assumptions about streams inherently cause undefined or specific behavior.
, , , , , , ifstream , . , , , , , . , ifstream, , . (.. istream::good() istream::operator bool). , istream.