The function returns true
if none of the stream's error flags (eofbit
) are set.
Notice that this function is not the exact opposite of bad()
, which only checks whether the badbit
error flag is set.
The error flags can be checked independently by using any of the member functions eof
The value returned by this function is the same as the result of evaluating:
(rdstate() == 0)
if none of the stream's state flags are set.
if any of the stream's state flags are set (badbit
Basic template member declaration
|ios::fail|| Check if either failbit or badbit is set (public member function)|
|ios::bad|| Check if badbit is set (public member function)|
|ios::eof|| Check if eofbit is set (public member function)|
|ios::clear|| Set error state flags (public member function)|