C ++의 템플릿 시스템은 컴파일 시간에 Turing-complete라고 들었습니다. 이것은이 게시물과 wikipedia에서도 언급됩니다. 이 속성을 활용하는 계산의 사소한 예를 제공 할 수 있습니까? 이 사실이 실제로 유용합니까? 예 #include template struct Factorial { enum { val = Factorial::val * N }; }; template struct Factorial { enum { val = 1 }; }; int main() { // Note this value is generated at compile time. // Also note that most compilers have a limit on the depth of the recursion avai..