On 06/04/2017 06:07 PM, Mike Parker wrote:
https://gist.github.com/mdparker/51599471b5f19fe05ff01ca95b34d453

From there: "What it boils down to is this: if a function *can* be executed at compile time, it *will* be."

I think that gives the wrong impression. We regularly have newcomers in D.learn who expect CTFE to happen where it doesn't. They have a function call with all compile-time constants, and they expect it to be handled by CTFE. They think that the call *can* be evaluated at compile time, so it *will* be. But that's not how it works. CTFE only kicks in when the destination *requires* a compile-time constant.

Reply via email to