Ejemplo n.º 1
0
void print_stream_state( const StreamType &stream )
{
    cout << "good: " << stream.good() << endl;
    cout << "eof: " << stream.eof() << endl;
    cout << "fail: " << stream.fail() << endl;
    cout << "bad: " << stream.bad() << endl;
    cout << bitset<4>(stream.rdstate()).to_string() << endl;
}
Ejemplo n.º 2
0
bool bad_stream( const StreamType &stream )
{ return (stream.fail() || stream.bad()); }