digitalmars.D.bugs - Minor bug in dmd
- Vladimir (16/16) Mar 31 2005 It hangs on infinite template recursion recursion. For example:
It hangs on infinite template recursion recursion. For example: template factorial(int n) { enum { factorial = n* .factorial!(n-1) } } template factorial(int n : 1) { enum { factorial = 1 } } void test() { printf("%d\n", factorial!(-4)); // hangs } In gnu g++ it is solved by limiting recursion level. -- Vladimir
Mar 31 2005