Created on 2009-03-24.00:00:00 last changed 161 months ago
Proposed resolution:
Change the synopis in [ios]:
explicit operatorunspecified-bool-typebool() const;
Change [iostate.flags]:
explicit operatorunspecified-bool-typebool() const;-1- Returns: !fail()
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]
[ 2009 Santa Cruz: ]
Moved to Ready.
[ Batavia (2009-05): ]
We agree with the proposed resolution. Move to Review.
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;
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg694 |
2010-10-21 18:28:33 | admin | set | messages: + msg693 |
2010-10-21 18:28:33 | admin | set | messages: + msg692 |
2009-03-24 00:00:00 | admin | create |