CTFE question
monkyyy
crazymonkyyy at gmail.com
Sat Jan 24 18:14:46 UTC 2026
On Saturday, 24 January 2026 at 16:06:03 UTC, DLearner wrote:
> Suppose we have a function fnFoo, capable (under some
> circumstances) of CTFE.
>
> Is it true that if fnFoo(compile-time values) yields a certain
> (compile-time) value, then
> fnFoo(same values at execution time) yields the same value at
> execution time?
Ussally, but you could always multiply by __ctfe
```d
int foo()=>3*__ctfe;
unittest{
enum a=foo;
assert(a!=foo);
}
```
I think theres also floating point math differences that have
survived
More information about the Digitalmars-d-learn
mailing list