Partager via


basic_ios::operator bool

Allows use of a basic_ios object as a bool. Automatic type conversion is disabled to prevent common, unintended side effects.

explicit operator bool() const;

Remarks

The operator returns a value convertible to false only if fail(). The return type is convertible only to bool, not to void * or other known scalar type.

Requirements

Header: <ios>

Namespace: std

See Also

Reference

basic_ios Class

iostream Programming

iostreams Conventions