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


2140. Lvalue-to-rvalue conversion of std::nullptr_t

Section: 7.3.2  [conv.lval]     Status: CD4     Submitter: Richard Smith     Date: 2015-06-12

[Adopted at the February, 2016 meeting.]

The current rules in 7.3.2 [conv.lval] paragraph 2 do not require fetching the value in memory of an object of type std::nullpt_t in order to produce its prvalue. This choice has implications that may not have been considered for questions like whether use of a std::nullptr_t that is an inactive member of a union results in undefined behavior or whether a volatile std::nullptr_t variable in a discarded-value expression produces a side effect.

Proposed resolution (January, 2016):

Change 7.3.2 [conv.lval] bullet 2.3 as follows:

...In all other cases, the result of the conversion is determined according to the following rules: