On Monday, 8 June 2020 at 18:43:58 UTC, Stanislav Blinov wrote:
On Monday, 8 June 2020 at 18:08:57 UTC, mw wrote:
2) even it does so, but why such simple function as lroundl
cannot be CTFE-ed?
Because, as the error message states, there's no source for it
:) std.math calls into C math library.
OK, but the compiler knows it's external C func:
return core.stdc.math.llroundl(x);
And with a symbol-to-c-func table, it should be able to just call
that C func.
This is dramatically enhance CTFE's eval ability, esp for math
funcs.