t.good() was mentioned by bashor
Note that t.good() != t.bad() ; You can use !t.bad() (or !t.fail() !t.eof() for certain conditions)
I usually use
if (!t.bad()) { // go ahead if no _unpexpected errors } if (!t.fail()) t.clear(); // clear any _expected_ errors
source share