CTFE with C functions not possible?

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Dec 31 04:35:06 PST 2015

On 01/01/16 1:29 AM, Shriramana Sharma wrote:
> Rikki Cattermole wrote:
>> You misunderstand, its hardcoded into the CTFE evaluator. That is what
>> an intrinsic is.
> What do you mean hardcoded into the CTFE evaluator? Surely you aren't
> suggesting that the D compiler contains its own implementation of the
> functions already implemented in libc?

Yes and no.
It has a small subset of functions which it consider intrinsics.
Intrinsics are only a way to tell the compiler hey go call x and give me 
the result.

Remember, if you don't have the source you can't execute it.
Unless you provide an escape hatch which is what intrinsics are.

More information about the Digitalmars-d-learn mailing list