CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 31 06:29:01 PDT 2016


Hi Guys, since I got a few complaints about giving minor status 
updates in the announce group, I am opening this thread.

I will start with giving an overview of what works and what does 
not work.

Currently the only basic type you can do arithmetic on is int.
Altough you can compare longs since a few days.

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

Please note that there will probably be bugs all over the place.
So even the working features might not be working completely.





More information about the Digitalmars-d mailing list