15.18.2 operator bool

operator bool() const

Evaluates the stream to a Boolean value based on whether the end of the stream has been reached. This is equivalent to !eof().