BUG: Need to clear read failure when string is reset.
This commit is contained in:
parent
6984c09310
commit
a43b3cc801
|
@ -68,6 +68,12 @@ int testIOS(int, char*[])
|
|||
kwsys_ios::cerr << "Able to read past end of stream" << kwsys_ios::endl;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Clear the failure.
|
||||
istr.clear(istr.rdstate() & ~kwsys_ios::ios::eofbit);
|
||||
istr.clear(istr.rdstate() & ~kwsys_ios::ios::failbit);
|
||||
}
|
||||
istr.str("30");
|
||||
if(istr >> x)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue