Like that:
template <size_t I, int N, int... R>
struct pick : pick <I - 1, R...> { };
template <int N, int... R>
struct pick <0, N, R...> : std::integral_constant <int, N> { };
so that
pick <3, 1, 2, 3, 4, 5, 6>::value
equals 4
, and
template<int... Is>
struct A
{
enum { CONSTANT_0 = pick <0, Is...>::value };
};
is how you would use it in your case.
Another way:
template <size_t I, int... N>
using pick = typename std::tuple_element <I,
std::tuple <std::integral_constant <int, N>...>
>::type;