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


722. Cannullptr be passed to an ellipsis?

Section:7.6.1.3  [expr.call]    Status:CD2    Submitter:Alisdair Meredith    Date:25 September, 2008

[Voted into WP at March, 2010 meeting.]

The current wording of 7.6.1.3 [expr.call] paragraph 7 is:

After these conversions, if the argument does not havearithmetic, enumeration, pointer, pointer to member, or effectiveclass type, the program is ill-formed.

It's not clear whether this is intended to exclude anything otherthanvoid, but the effect is to disallow passingnullptr to ellipsis. That seems unnecessary.

Notes from the October, 2009 meeting:

The CWG agreed that this should be supported and the effectshould be like passing(void*)nullptr.

Proposed resolution (February, 2010):

Change 7.6.1.3 [expr.call] paragraph 7 as follows:

When there is no parameter for a given argument, the argument ispassed in such a way that the receiving function can obtain thevalue of the argument by invokingva_arg (17.14 [support.runtime]). [Note: This paragraph does not apply toarguments passed to a function parameter pack. Functionparameter packs are expanded during template instantiation(13.7.4 [temp.variadic]), thus each such argument has acorresponding parameter when a function template specializationis actually called. —end note] The lvalue-to-rvalue(7.3.2 [conv.lval]), array-to-pointer (7.3.3 [conv.array]), and function-to-pointer (7.3.4 [conv.func])standard conversions are performed on the argument expression.An argument that has (possibly cv-qualified) typestd::nullptr_t is converted to typevoid*(7.3.12 [conv.ptr]). After these conversions...



[8]ページ先頭

©2009-2026 Movatter.jp