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


2133. Converting std::nullptr_t to bool

Section: 7.3.14  [conv.fctptr]     Status: CD5     Submitter: Richard Smith     Date: 2015-05-28

[Accepted as a DR at the November, 2018 (San Diego) meeting.]

According to 7.3.14 [conv.fctptr] paragraph 1,

For direct-initialization (9.4 [dcl.init]), a prvalue of type std::nullptr_t can be converted to a prvalue of type bool; the resulting value is false.

The mention of direct-initialization in this context (added by issue 1423) seems odd; standard conversions are on a level below initialization. Should this wording be moved to 9.4 [dcl.init], perhaps as a bullet in paragraph 1?

(See also issue 1781.)

Proposed resolution (June, 2018):

This issue is resolved by the resolution of issue 1781.