Am Wed, 8 Oct 2014 23:20:13 +0300
schrieb ketmar via Digitalmars-d <[email protected]>:

> On Wed, 08 Oct 2014 13:10:11 -0700
> Andrei Alexandrescu via Digitalmars-d <[email protected]>
> wrote:
> 
> > Or would "static if (__ctfe)" work? -- Andrei
> ha! The Famous Bug! it works, but not as people expected. as "static
> if" evaluates when function is *compiling*, __ctfe is false there, and
> so the whole "true" branch will be removed as dead code.
> 
> i believe that compiler should warn about this, 'cause i'm tend to
> repeatedly hit this funny thing.

Lol, definitely! I made that mistake myself and Robert
Schadek, too in his std.logger. It is now the #1 bug in D code.

-- 
Marco

Attachment: signature.asc
Description: PGP signature

Reply via email to