Created on 2024-09-18.00:00:00 last changed 1 month ago
Proposed resolution:
This wording is relative to N4988.
Modify [nullablepointer.requirements] as indicated:
-3- An object `p` of type `P` can be contextually converted to `bool`. The effect shall be as if `p != nullptr` had been evaluated in place of `p`.
Add a row to the bottom of [tab:cpp17.nullablepointer]:
Expression Return type Operational semantics ... ... ... `a ? true : false` `bool` `a != np`
[ 2024-10-02; Reflector poll ]
Set priority to 3 after reflector poll.
"This is an improvement, but judging from microsoft/STL 4964, I think we actually want to define a "contextually-boolean-testable" for this."
Currently, [nullablepointer.requirements]/3 requires "An object `p` of type `P` can be contextually converted to `bool`", while the core language wording ([conv.general]/4) only says some expressions can be contextually converted to `bool`. Moreover, the value category and cv-qualification are not mentioned, presumably both non-const and const `P`, together with all value categories are expected.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-10-02 12:43:09 | admin | set | messages: + msg14407 |
2024-09-18 20:08:38 | admin | set | messages: + msg14373 |
2024-09-18 00:00:00 | admin | create |