1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
#include <iostream>

template <unsigned int i, unsigned int ...v>
struct D
{
    static constexpr unsigned int vale = 42;
};


template <unsigned int i>
struct Dummy
{
    static constexpr unsigned int value = i;
};


template <unsigned int ...moves>
struct Foo
{
    static constexpr unsigned int value
        = D<Dummy<moves>::value...>::value;
};

int
main()
{
    std::cout << "Foo<3, 5, 6, 7>::value = "
              << Foo<3567>::value << std::endl;
}