This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
Consider this inconsistency:
void func(long l, float f) { (void)reinterpret_cast<long *>(&l); // ok (void)reinterpret_cast<long>(l); // ok (void)reinterpret_cast<float *>(&f); // ok (void)reinterpret_cast<float>(f); // ill-formed }
Suggested resolution:
Change in 7.6.1.10 [expr.reinterpret.cast] paragraph 2 as follows:
... An expression ofintegralarithmetic, enumeration, pointer, or pointer-to-member type can be explicitly converted to its own type; such a cast yields the value of its operand.
Rationale (November, 2016):
The specification is as intended.