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

2024-11-11


2391. Additional template parameters following pack expansion

Section: 13.7.4  [temp.variadic]     Status: dup     Submitter: Richard Smith     Date: 2018-12-03

The Standard is not clear on the treatment of an example like the following, and there is implementation variance:

  template<class ...Types> struct Tuple_ { // _VARIADIC_TEMPLATE
    template<Types ...T, int> int f() {
      return sizeof...(Types);
    }
  };

  int main() {
    Tuple_<char,int> a;
    int b = a.f<1, 2, 3>();
  }

Rationale (February, 2019):

This issue is covered in more detail in issue 2395.