basic_ios::eof

bool eof() const;

The member function returns true if rdstate() & eofbit.