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

2024-10-26


2032. Default template-arguments of variable templates

Section: 13.2  [temp.param]     Status: CD4     Submitter: CWG     Date: 2014-11-03

[Adopted at the February, 2016 meeting.]

According to 13.2 [temp.param] paragraph11,

If a template-parameter of a class template or alias template has a default template-argument, each subsequent template-parameter shall either have a default template-argument supplied or be a template parameter pack. If a template-parameter of a primary class template or alias template is a template parameter pack, it shall be the last template-parameter.

These requirements should apply to variable templates as well.

Proposed resolution (September, 2015):

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

If a template-parameter of a class template, variable template, or alias template has a default template-argument, each subsequent template-parameter shall either have a default template-argument supplied or be a template parameter pack. If a template-parameter of a primary class template, primary variable template, or alias template is a template parameter pack, it shall be the last template-parameter. A template parameter pack...