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


1006. std::nullptr_t as a non-type template parameter

Section: 13.2  [temp.param]     Status: C++11     Submitter: Mike Miller     Date: 2009-11-20

[Voted into the WP at the November, 2010 meeting.]

std::nullptr_t is not currently allowed by 13.2 [temp.param] paragraph 4 to be used as the type of a non-type template parameter. However, this could arise for a template with a non-type template parameter with a dependent type in a template intended for use with pointers, e.g.,

    template<typename T, T t> void f();
    ...
    f<std::nullptr_t, nullptr>();

or in a case of delegation.

Proposed resolution (September, 2010):

Change 13.2 [temp.param] paragraph 4 as follows:

A non-type template-parameter shall have one of the following (optionally cv-qualified) types: