#include template struct Factorial{ static int const value= N * Factorial::value; }; template <> struct Factorial<1>{ static int const value = 1; }; int main(){ std::cout << Factorial<5>::value << std::endl; std::cout << 120 << std::endl; return 0; }