void* non-type template parameters
13.2 [temp.param]
Daveed Vandevoorde

Created on 2017-04-17.00:00:00 last changed 5 months ago


Date: 2021-02-17.00:00:00

Additional note, February, 2021:

Although this issue was ultimately resolved for C++20 by the adoption of paper P1907R1, it was previously addressed in a different manner by paper P0732R2, adopted at the June, 2018 meeting.

Date: 2018-04-15.00:00:00

Notes from the April, 2018 teleconference:

Not all implementations accept a void* template parameter, so this should not be a DR if it is eventually adopted. Furthermore, there is some implementation divergence over the kinds of template arguments that can be passed to a void* template parameter. CWG felt that EWG should weigh in on the desirability and content of this change.

Date: 2019-11-15.00:00:00

[Adopted at the November, 2019 meeting as part of paper P1907R1.]

According to 13.2 [temp.param] bullet 4.2, non-type template parameters of pointer type must be either

  • pointer to object or pointer to function

This excludes void*, which is an object pointer but not a pointer to object. However, most or all current implementations accept void* as a non-type template parameter.

Date User Action Args
2021-02-17 00:00:00adminsetmessages: + msg6518
2021-02-17 00:00:00adminsetstatus: extension -> c++20
2018-04-11 00:00:00adminsetmessages: + msg6216
2018-04-11 00:00:00adminsetstatus: open -> extension
2017-04-17 00:00:00admincreate