Compile-time optimization

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jul 24 10:08:27 PDT 2013


On Wed, Jul 24, 2013 at 09:22:14AM -0700, Ali Çehreli wrote:
> On 07/24/2013 02:56 AM, monarch_dodra wrote:
> 
> > On Tuesday, 23 July 2013 at 17:41:01 UTC, Ali Çehreli wrote:
> 
> >> Are you aware of version(ctfe)?
> >
> > Hum... really? I don't think that exists.
> 
> You are right. I must be remembering old proposals about it.
[...]

There's if(__ctfe), but unfortunately (IIRC) it doesn't work with static
if, because CTFE runs after static ifs have been processed. So it might
not be enough if you have code that has parts that can't run under CTFE.
Those parts will taint all parent functions up the call tree as
non-CTFEable, so once you have them you're out of luck.


T

-- 
We are in class, we are supposed to be learning, we have a teacher... Is
it too much that I expect him to teach me??? -- RL


More information about the Digitalmars-d mailing list