This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


1098. Pointer conversions in constant expressions

Section: 7.7  [expr.const]     Status: C++11     Submitter: Jason Merrill     Date: 2010-08-01

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

One of the bullets in 7.7 [expr.const] paragraph 2 says,

This appears to prohibit conversion from one pointer type to another; for example,

    int x;
    constexpr void* p = &x;   // ill-formed

This seems excessive and probably unintentional.

Proposed resolution (November, 2010) [SUPERSEDED]:

Change 7.7 [expr.const] paragraph 2 as follows:

[Note: the proposed resolution of issue 1188 edits this bullet in an incompatible fashion.]