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

2024-03-20


691. Template parameter packs in class template partial specializations

Section: 13.2  [temp.param]     Status: C++11     Submitter: Doug Gregor     Date: 9 April, 2008

[Voted into WP at August, 2010 meeting.]

13.2 [temp.param] paragraph 11 currently says,

If a template-parameter of a class template is a template parameter pack, it shall be the last template-parameter. [Note: These are not requirements for function templates because template arguments might be deduced (13.10.3 [temp.deduct])...

This restriction was only meant to apply to primary class templates, not partial specializations.

Suggested resolution:

If a template-parameter of a primary class template is a template parameter pack, it shall be the last template-parameter. [Note: These are not requirements for function templates or class template partial specializations because template arguments might be deduced (13.10.3 [temp.deduct])...

Proposed resolution (February, 2010):

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

If a template-parameter of a class 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 is a template parameter pack, it shall be the last template-parameter. [Note: These are not requirements for function templates or class template partial specializations because template arguments might can be deduced (13.10.3 [temp.deduct]). [Example:...