Template Meta Programming
컴파일러에게 프로그램 코듸를 생성하도록 하는 방식
컴파일 시점에 많은 것을 결정하도록 하여, 실행 시점의 계산을 줄여준다
template <int N> struct Factorial { enum { value = N * Factorial<N - 1>::value }; }; template <> struct Factorial<0> { enum { value = 1 }; }; // Factorial<4>::value == 24 // Factorial<0>::value == 1