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
[Accepted as a DR at the November, 2023 meeting.]
P2738R1 (constexpr cast from void*: towards constexpr type-erasure) applied incorrect wording to 7.7 [expr.const] bullet 5.14:
- ...
- a conversion from a prvalue P of type ”pointer to cv void” to a pointer-to-object type T unless P points to an object whose type is similar to T;
- ...
The issue is that T is defined to be a pointer type, but the "similar to" phrasing uses it as the pointee type.
Proposed resolution (approved by CWG 2023-07-14):
Change in 7.7 [expr.const] bullet 5.14 as follows:
- ...
- a conversion from a prvalue P of type ”pointer to cv void” to a
pointer-to-objecttypeT"cv1 pointer to T", where T is not cv2 void, unless P points to an object whose type is similar to T;- ...