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: 184.108.40.206 [iostate.flags] Status: C++11 Submitter: P.J. Plauger Opened: 2009-03-24 Last modified: 2017-02-03
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 30.5.5 [ios]:
Change 220.127.116.11 [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]