newCTFE Status June 2020

rikki cattermole rikki at cattermole.co.nz
Mon Jun 8 21:42:56 UTC 2020


On 09/06/2020 9:07 AM, Stefan Koch wrote:
> Ah so bringing a class to the initial state, is done by _d_newclass.
> Yet another runtime function which CTFE has to re-implement.

I wonder if you could CTFE it?

https://github.com/dlang/druntime/blob/2fa694319da397d72ab09cb336f3d588107278c1/src/rt/lifetime.d#L73

If only there was a way to get the init state of a class that didn't 
rely on TypeInfo (like a trait).

Incidentally that would make extern(C++) classes work properly and 
easily in -betterC


More information about the Digitalmars-d mailing list