Created on 2007-06-06.00:00:00 last changed 183 months ago
Proposed resolution:
In section [propagation] insert a new paragraph between p.5 and p.6:
An object e of type exception_ptr can be contextually converted to bool. The effect shall be as if e != exception_ptr() had been evaluated in place of e. There shall be no implicit conversion to arithmetic type, to enumeration type or to pointer type.
Rationale:
Solved by N3073.
[ 2010-03-14 Howard adds: ]
We moved N3073 to the formal motions page in Pittsburgh which should obsolete this issue. I've moved this issue to NAD Editorial, solved by N3073.
[ 2009 Santa Cruz: ]
Move to Ready. Note to editor: considering putting in a cross-reference to [conv], paragraph 3, which defines the phrase "contextually converted to bool".
As of N2857 [propagation] p.5, the implementation-defined type exception_ptr does provide the following ways to check whether it is a null value:
void f(std::exception_ptr p) {
p == nullptr;
p == 0;
p == exception_ptr();
}
This is rather cumbersome way of checking for the null value and I suggest to require support for evaluation in a boolean context like so:
void g(std::exception_ptr p) {
if (p) {}
!p;
}
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-11-19 19:04:45 | admin | set | status: nad editorial -> resolved |
| 2010-10-21 18:28:33 | admin | set | messages: + msg879 |
| 2010-10-21 18:28:33 | admin | set | messages: + msg878 |
| 2010-10-21 18:28:33 | admin | set | messages: + msg877 |
| 2010-10-21 18:28:33 | admin | set | messages: + msg876 |
| 2007-06-06 00:00:00 | admin | create | |