public member function
<ios> <iostream>
std::basic_ios::setstatevoid setstate (iostate state);
Set error state flag
Modifies the current internal error state flags by combining the current flags with those in argument state (as if performing a bitwise OR operation).Any error bitflag already set is not cleared. See member clear for a similar function that does.
In the case that no stream buffer is associated with the stream when this function is called, the badbit flag is automatically set (no matter the value for that bit passed in argument state).
Note that changing the state may throw an exception, depending on the latest settings passed to member exceptions.
The current state can be obtained with member function rdstate.
This function behaves as if defined as:
1
2
3
void basic_ios::setstate (iostate state) {
clear(rdstate()|state);
}
true
false
false
false
goodbit eofbit End-of-File reached on input operation false
true
false
false
eofbit failbit Logical error on i/o operation false
false
true
false
failbit badbit Read/writing error on i/o operation false
false
true
true
badbit eofbit, failbit and badbit are member constants with implementation-defined values that can be combined (as if with the bitwise OR operator).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4