This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


2343. void* non-type template parameters

Section: 13.2  [temp.param]     Status: C++20     Submitter: Daveed Vandevoorde     Date: 2017-04-17

[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

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.

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.

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.