Simen Kjaeraas wrote: > On Thu, 20 Sep 2012 23:22:36 +0200, Jens Mueller > <jens.k.muel...@gmx.de> wrote: > > >string foo(string f) > >{ > > if (f == "somestring") > > { > > return "got somestring"; > > } > > return bar!(foo("somestring")); > >} > > > >template bar(string s) > >{ > > enum bar = s; > >} > > >In line 7 I call the template bar. But I call with the string that is > >returned by the CTFE of foo("somestring") which should return "got > >somestring" > > When's it gonna get around to doing that? In order to figure out the > return value of foo("somestring"), it will have to figure out the > return value of foo("somestring"), and to do that...
There is no endless recursion. Note that foo("somestring") returns "got somestring". Am I wrong? Jens