CTFE using compiler intrinsics but without phobos/druntime.

Dennis dkorpel at gmail.com
Mon Nov 9 18:54:28 UTC 2020


On Monday, 9 November 2020 at 18:19:42 UTC, Kayo wrote:
> Hmm...
> It seems this works when I defines `sin` function for `real` 
> arg like so:

Currently the compiler has a list of built in functions, making 
them available at CTFE even if their source is missing.

https://github.com/dlang/dmd/blob/5fda4ea088f70afb99818482e8482771758136a2/src/dmd/func.d#L67
https://github.com/dlang/dmd/blob/master/src/dmd/builtin.d

The current list includes functions from `std.math`, `core.math` 
and `core.bitop`. If you think something is missing, you can file 
an issue and / or open a pull request.



More information about the Digitalmars-d mailing list