CTFE is getting too powerful :o)

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Mar 27 14:37:09 PDT 2013


On Wed, Mar 27, 2013 at 10:19:12PM +0100, Timon Gehr wrote:
> On 03/27/2013 06:50 PM, H. S. Teoh wrote:
> >On Wed, Mar 27, 2013 at 06:29:59PM +0100, Timon Gehr wrote:
> >>On 03/27/2013 06:20 PM, H. S. Teoh wrote:
> >>>On Wed, Mar 27, 2013 at 05:55:54PM +0100, Timon Gehr wrote:
> >>>[...]
> >>>>If CTFE does not terminate, compilation is not allowed to succeed.
> >>>
> >>>Heh, I think this one is unimplementable, as it amounts to solving
> >>>the halting problem. :)
> >>>...
> >>
> >>Actually it does not. Non-success denotes either failure or
> >>non-termination.
> >
> >But how do you check for non-termination?
[...]
> 
> Why would you need to?

How else would you force compilation to fail in that case?


T

-- 
In order to understand recursion you must first understand recursion.


More information about the Digitalmars-d mailing list