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

template <unsigned int ...v>
struct D
{};

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

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


int
main()
{
    std::cout << Nim<1234>::value << std::endl;
}