Created on 2009-03-03.00:00:00 last changed 178 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (October, 2009):
Change 7.6.1.10 [expr.reinterpret.cast] paragraph 2 as follows:
The reinterpret_cast operator shall not cast away constness (7.6.1.11 [expr.const.cast]).[Note: Subject to the restrictions in this section, an expression may be cast to its own type using a reinterpret_cast operator. —end note]An expression of integral, enumeration, pointer, or pointer-to-member type can be explictly converted to its own type; such a cast yields the value of its operand.
Change 7.6.1.10 [expr.reinterpret.cast] paragraph 10 as follows:
An rvalue of type “pointer to member of X of type T1” can be explicitly converted to an rvalue of a different type “pointer to member of Y of type T2” if T1 and T2 are both function types or both object types...
The note in 7.6.1.10 [expr.reinterpret.cast] paragraph 2 says,
Subject to the restrictions in this section, an expression may be cast to its own type using a reinterpret_cast operator.
However, there is nothing in the normative text that permits this conversion, and paragraph 1 forbids any conversion not explicitly permitted.
(See also issue 944.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | messages: + msg2676 |
2010-03-29 00:00:00 | admin | set | status: ready -> cd2 |
2009-08-03 00:00:00 | admin | set | messages: + msg2146 |
2009-08-03 00:00:00 | admin | set | status: open -> ready |
2009-03-03 00:00:00 | admin | create |