Title
std::nullptr_t as a non-type template parameter
Status
c++11
Section
13.2 [temp.param]
Submitter
Mike Miller

Created on 2009-11-20.00:00:00 last changed 131 months ago

Messages

Date: 2010-11-15.00:00:00

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

Date: 2010-09-15.00:00:00

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:

  • integral or enumeration type,

  • pointer to object or pointer to function,

  • lvalue reference to object or lvalue reference to function,

  • pointer to member.,

  • std::nullptr_t.

Date: 2009-11-20.00:00:00

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.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetstatus: dr -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3196
2010-11-29 00:00:00adminsetstatus: tentatively ready -> dr
2010-10-18 00:00:00adminsetmessages: + msg2992
2010-10-18 00:00:00adminsetstatus: drafting -> tentatively ready
2010-08-23 00:00:00adminsetstatus: open -> drafting
2009-11-20 00:00:00admincreate