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

2024-12-19


2105. When do the arguments for a parameter pack end?

Section: 13.4  [temp.arg]     Status: open     Submitter: Hubert Tong     Date: 2015-03-17

There does not appear to be a clear statement in the Standard that the first template parameter pack in a template parameter list corresponds to all remaining arguments in the template argument list. For example:

  template <int> struct A;

  template <int ...N, typename T> void foo(A<N> *..., T);
  void bar() {
   foo<0>(0, 0);      // okay: N consists of one template parameter, 0. T is deduced to int
   foo<0, int>(0, 0); // error: int does not match the form of the corresponding parameter N
  }

See also issue 2055.

Notes from the February, 2016 meeting:

The comments in the example reflect the intent.