This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
Section: 18.104.22.168 [iostate.flags] Status: C++11 Submitter: P.J. Plauger Opened: 2009-03-24 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [iostate.flags].
View all issues with C++11 status.
Addresses JP 65 and JP 66 [CD1]
Switch from "unspecified-bool-type" to "explicit operator bool() const".
Replace operator unspecified-bool-type() const;" with explicit operator bool() const;
[ Batavia (2009-05): ]
We agree with the proposed resolution. Move to Review.
[ 2009 Santa Cruz: ]
Moved to Ready.
Change the synopis in 27.5.5 [ios]:
Change 22.214.171.124 [iostate.flags]:
If fail() then a value that will evaluate false in a boolean context; otherwise a value that will evaluate true in a boolean context. The value type returned shall not be convertible to int.
[Note: This conversion can be used in contexts where a bool is expected (e.g., an if condition); however, implicit conversions (e.g., to int) that can occur with bool are not allowed, eliminating some sources of user error. One possible implementation choice for this type is pointer-to-member. -- end note]