This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


722. Can nullptr be passed to an ellipsis?

Section:  []     Status: CD2     Submitter: Alisdair Meredith     Date: 25 September, 2008

[Voted into WP at March, 2010 meeting.]

The current wording of [] paragraph 7 is:

After these conversions, if the argument does not have arithmetic, enumeration, pointer, pointer to member, or effective class type, the program is ill-formed.

It's not clear whether this is intended to exclude anything other than void, but the effect is to disallow passing nullptr to ellipsis. That seems unnecessary.

Notes from the October, 2009 meeting:

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

Proposed resolution (February, 2010):

Change [] paragraph 7 as follows:

When there is no parameter for a given argument, the argument is passed in such a way that the receiving function can obtain the value of the argument by invoking va_arg (17.13 [support.runtime]). [Note: This paragraph does not apply to arguments passed to a function parameter pack. Function parameter packs are expanded during template instantiation (13.7.4 [temp.variadic]), thus each such argument has a corresponding parameter when a function template specialization is 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) type std::nullptr_t is converted to type void* (7.3.12 [conv.ptr]). After these conversions...