C++11: Number of Variadic Template Function Parameters?
Just write this: const std::size_t n = sizeof…(T); //you may use `constexpr` instead of `const` Note that n is a constant expression (i.e known at compile-time), which means you may use it where constant expression is needed, such as: std::array<int, n> a; //array of n elements std::array<int, 2*n> b; //array of (2*n) elements auto middle … Read more