No CTFE of function

Cecil Ward via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 27 10:47:54 PDT 2017


On Sunday, 27 August 2017 at 17:36:54 UTC, Cecil Ward wrote:
> On Sunday, 27 August 2017 at 00:20:47 UTC, ag0aep6g wrote:
>> [...]
>
> Static had already been tried. Failed. Thanks to your tip, I 
> tried enum next. Failed as well, wouldn't compile with GDC.
>
> [...]

I wonder if there is anything written up anywhere about what 
kinds of things are blockers to either CTFE or to successful 
constant-folding optimisation in particular compilers or in 
general?

Would be useful to know what to stay away from if you really need 
to make sure that horrendously slow code does not get run at 
runtime. Sometimes it is possible or even relatively easy to 
reorganise things and do without certain practices in order to 
win such a massive reward.


More information about the Digitalmars-d-learn mailing list