basic_ios::clear

basic_ios::clear

void clear(iostate state = goodbit);

The member function replaces the stored stream state information with state | (rdbuf() != 0 ? goodbit : badbit). If state & exceptions() is nonzero, it then throws an object of class failure.