BetterC and CTFE mismatch

Simen Kjærås simen.kjaras at gmail.com
Wed Sep 26 08:22:26 UTC 2018


On Wednesday, 26 September 2018 at 08:06:27 UTC, Sebastiaan Koppe 
wrote:
> Right now I am building a betterC application and I would have 
> expected to be able to use the D standard library in CTFE.
>
> It seems this is not the case. Can anyone explain why? It seems 
> to be an arbitrary limitation.
>
> example: 
> https://run.dlang.io/gist/8ee9456bfae061eba81c931999183e49?args=-betterC

This is essentially an arbitrary restriction. The basic reason is 
if a function is compiled (even just for CTFE), it ends up in the 
object files, and you've asked for only betterC functions to end 
up in the object files.

--
   Simen


More information about the Digitalmars-d mailing list