@ctfeonly
ketmar
ketmar at ketmar.no-ip.org
Fri Dec 8 03:56:21 UTC 2017
ketmar wrote:
> still, why `__ctfe` was designed as variable, and not as `enum ctfe =
> <bool>;`?
p.s.: i see only one reason for this rationale: to explicitly prevent
people using `static if` to separate CTFE and non-CTFE code (that is, to
lessen the chance than function heaves differently in runtime and in
compile-time). but that doesn't work, as `if (__ctfe)` allows two
completely different code pathes anyway.
More information about the Digitalmars-d
mailing list