#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<1, 2, 3, 4>::value << std::endl; } |