Section: 188.8.131.52 [iostate.flags] Status: CD1 Submitter: Martin Sebor Opened: 2000-11-02 Last modified: 2016-01-28 10:19:27 UTC
Priority: Not Prioritized
View all other issues in [iostate.flags].
View all issues with CD1 status.
Duplicate of: 569
184.108.40.206, p4 says about the postcondition of the function: If rdbuf()!=0 then state == rdstate(); otherwise rdstate()==state|ios_base::badbit.
The expression on the right-hand-side of the operator==() needs to be parenthesized in order for the whole expression to ever evaluate to anything but non-zero.
Add parentheses like so: rdstate()==(state|ios_base::badbit).