Template lowering of druntime hooks that CTFE cannot interpret

Timon Gehr timon.gehr at gmx.ch
Mon Jan 17 23:49:55 UTC 2022

On 17.01.22 16:25, Teodor Dutu wrote:
> Do you suggest any other solutions than those we propose?

Detect `if(__ctfe)` and don't do the rewrites in its body. Then use 
`if(__ctfe)` in the runtime hooks to provide an implementation that's 
compatible with CTFE. Of course, this won't work with the hooks that you 
have designed in a way that invokes UB, but I think that's a feature as 
those should be redesigned.

More information about the Digitalmars-d mailing list