Why this code can't take advantage from CTFE?

Messenger via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 3 08:07:59 PST 2016


On Wednesday, 3 February 2016 at 15:59:43 UTC, Adam D. Ruppe 
wrote:
> You never asked for CTFE.
>
> CTFE only happens when it *has* to - when you write code that 
> specifically asks for or requires it.

What is a good way to try to force it? Using enum? Then 
optionally copying the value once to avoid the "manifest 
constant" copy/paste behaviour, where applicable?



More information about the Digitalmars-d-learn mailing list