CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 1 10:41:35 PDT 2016


On Tuesday, 1 November 2016 at 16:44:14 UTC, Nordlöw wrote:
> On Monday, 31 October 2016 at 13:29:01 UTC, Stefan Koch wrote:
>> These are the constructs that will work.
>>
>> - foreach on static arrays strings and range-foreach  (those 
>> kinds (0 .. 64)).
>> - switches (even deeply nested ones)
>> - for and while loops
>> - ternary expressions (? :)
>> - if and else statements (as long as you don't use && and || )
>> - lables and gotos
>> - arithmetic expressions as well as post and pre increment and 
>> decrement
>>
>> Constructs that will not work (but are actively worked on)
>>
>> - assignment to static array cells
>> - long ulong arithmetic.
>> - function calls
>> - dynamic arrays and slices
>> - pointers
>> - structs
>> - && and ||
>> - sliceing
>>
>> Constructs that will not work and are futher down the list.
>>
>> - classes
>> - closures
>> - boundschecks
>> - asserts
>
> Do all these work in current implementation?

Yes of they do!

There is a lot of work behind the implementation!
I intend to keep the current implemntation around as a fallback.
For things that are used rarely.
like floating point and others :)


More information about the Digitalmars-d mailing list