Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


1423. Convertibility ofnullptr tobool

Section:7.3.14  [conv.fctptr]    Status:CD3    Submitter:Dave Abrahams    Date:2011-12-04

[Moved to DR at the October, 2012 meeting.]

The resolution ofissue 654 (foundin paper N2656) enabled conversion of rvalues of typestd::nullptr_t tobool. It appears that the usecases for this conversion are primarily or exclusively the“contextually converted tobool” cases, withsome possibility for inadvertent misuse in other contexts. PaperN2656 mentioned the idea of limiting the conversions to thedirect initialization contexts; that possibility should bereexamined.

Proposed resolution (February, 2012):

Change 7.3.14 [conv.fctptr] paragraph 1 as follows:

...any other value is converted totrue.AFor direct-initialization (9.5 [dcl.init]), aprvalue of typestd::nullptr_t can be converted to a prvalueof typebool; the resulting value isfalse.



[8]ページ先頭

©2009-2026 Movatter.jp