On Wed, 08 Oct 2014 23:40:01 +0200 Timon Gehr via Digitalmars-d <[email protected]> wrote:
> This is probably a regression somewhere after 2.060, because with > 2.060 I get > > Error: variable __ctfe cannot be read at compile time > Error: expression __ctfe is not constant or does not evaluate to a > bool > > as I'd expect. i remember now that i was copypasting toHash() from druntime some time ago and changed "if (__ctfe)" to "static if (__ctfe)" in process. it compiles and works fine, and i don't even noticed what i did until i tried to change non-ctfe part of toHash() and found that my changes had no effect at all. and then i discovered that "static". this was 2.066 or 2.067-git. and now i can clearly say that "static if (__ctfe)" leaving only ctfe part. that was somewhat confusing, as i was pretty sure that "if (__ctfe)" *must* be used with "static".
signature.asc
Description: PGP signature
