Created on 1999-07-13.00:00:00 last changed 262 months ago
Proposed resolution (10/00):
Change the first sentence of 7.6.1.9 [expr.static.cast] paragraph 10 to
An rvalue of type "pointer to cv1 void" can be converted to an rvalue of type "pointer to cv2 T", where T is an object type and cv2 is the same cv-qualification as, or greater cv-qualification than, cv1.
According to 7.6.1.9 [expr.static.cast] paragraph 10,
An rvalue of type "pointer to cv void" can be explicitly converted to a pointer to object type.No requirements are stated regarding the cv-qualification of the pointer to object type. Contrast this with the formula used in paragraphs 5, 8, and 9, where the treatment of cv-qualification is explicit, requiring that the target type be at least as cv-qualified as the source. There is an apparently general requirement on all forms of static_cast in 7.6.1.9 [expr.static.cast] paragraph 1 that it "shall not cast away constness." Assuming that this restriction applies to paragraph 10, since there is no explicit exception to the general rule, that still leaves open the question of whether one can "cast away volatility" in a conversion from volatile void* to a pointer to object type. Should 7.6.1.9 [expr.static.cast] paragraph 10 be rewritten to handle cv-qualification in the same way as paragraphs 5, 8, and 9?
History | |||
---|---|---|---|
Date | User | Action | Args |
2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
2000-11-18 00:00:00 | admin | set | status: ready -> dr |
2000-05-21 00:00:00 | admin | set | status: review -> ready |
2000-02-23 00:00:00 | admin | set | messages: + msg219 |
2000-02-23 00:00:00 | admin | set | status: open -> review |
1999-07-13 00:00:00 | admin | create |