Re: Why if(__ctfe)?

2014-09-16 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Tuesday, 16 September 2014 at 13:28:17 UTC, Rene Zwanenburg wrote: On Tuesday, 16 September 2014 at 13:17:28 UTC, Adam D. Ruppe wrote: On Tuesday, 16 September 2014 at 13:11:50 UTC, Ilya Yaroshenko wrote: Why not "static if(__ctfe)" ? ctfe is a runtime condition. The function has the same

Re: Why if(__ctfe)?

2014-09-16 Thread Rene Zwanenburg via Digitalmars-d-learn
On Tuesday, 16 September 2014 at 13:17:28 UTC, Adam D. Ruppe wrote: On Tuesday, 16 September 2014 at 13:11:50 UTC, Ilya Yaroshenko wrote: Why not "static if(__ctfe)" ? ctfe is a runtime condition. The function has the same code when run at compile time, it is just being run in a different en

Re: Why if(__ctfe)?

2014-09-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 16 September 2014 at 13:11:50 UTC, Ilya Yaroshenko wrote: Why not "static if(__ctfe)" ? ctfe is a runtime condition. The function has the same code when run at compile time, it is just being run in a different environment.

Why if(__ctfe)?

2014-09-16 Thread Ilya Yaroshenko via Digitalmars-d-learn
Why not "static if(__ctfe)" ?