Re: __ctfe

2012-10-02 Thread Daniel Murphy
"Jonathan M Davis" wrote in message news:mailman.477.1349164468.5162.digitalmar...@puremagic.com... > > By the way, why is it not used in static if? That's what most of us would > have > expected (and it frequently seems to trip people up). I assume that it's > due > to some implementation deta

Re: __ctfe

2012-10-02 Thread Jonathan M Davis
On Tuesday, October 02, 2012 09:45:10 Don Clugston wrote: > On 01/10/12 21:30, Adam D. Ruppe wrote: > > On Monday, 1 October 2012 at 19:22:37 UTC, Philippe Sigaud wrote: > >> Something I wanted to ask for a long time: is there any runtime speed > >> penalty in usin

Re: __ctfe

2012-10-02 Thread Don Clugston
On 01/10/12 21:30, Adam D. Ruppe wrote: On Monday, 1 October 2012 at 19:22:37 UTC, Philippe Sigaud wrote: Something I wanted to ask for a long time: is there any runtime speed penalty in using __ctfe? No. What happens is when it goes to the compile the runtime code, __ctfe is a constant false

Re: __ctfe

2012-10-01 Thread Philippe Sigaud
On Mon, Oct 1, 2012 at 9:30 PM, Adam D. Ruppe wrote: > On Monday, 1 October 2012 at 19:22:37 UTC, Philippe Sigaud wrote: >> >> Something I wanted to ask for a long time: is there any runtime speed >> penalty in using __ctfe? > > > No. What happens is when it goes t

Re: __ctfe

2012-10-01 Thread Adam D. Ruppe
On Monday, 1 October 2012 at 19:22:37 UTC, Philippe Sigaud wrote: Something I wanted to ask for a long time: is there any runtime speed penalty in using __ctfe? No. What happens is when it goes to the compile the runtime code, __ctfe is a constant false, so then the optimizer can see it is

__ctfe

2012-10-01 Thread Philippe Sigaud
On Mon, Oct 1, 2012 at 8:36 PM, Jonathan M Davis wrote: [Creating a new thread for this] __ctfe exists purely so that you can provide an alternate implementation which works at compile time when the normal implementation doesn't (since CTFE _is_ more restrictive in what it allows