cpp/io/basic ios/operator bool

Checks whether the stream has no errors.

@1@ Returns a value that evaluates to in a boolean context if  returns, otherwise returns a value that evaluates to  in a boolean context.

@2@ Returns if the stream has no errors and is ready for I/O operations. Specifically, returns.

This operator makes it possible to use streams and functions that return references to streams as loop conditions, resulting in the idiomatic C++ input loops such as or. Such loops execute the loop's body only if the input operation succeeded.

Parameters
(none)

Return value
@1@ A value that evaluates to in a boolean context if the stream has no errors, a value that evaluates to  in a boolean context otherwise.

@2@ if the stream has no errors,  otherwise.