pragma(__ctfe)

Basile B. b2.temp at gmx.com
Sun Nov 26 20:17:50 UTC 2023


On Thursday, 28 September 2023 at 11:05:07 UTC, Bruce Carneal 
wrote:
> Correct.  If the function is intended to actually be ctfe only, 
> as marked, and a reference somehow gets emitted to be linked 
> against, then you will see a link time error.

Yes but that should be trivial to add a check during CallExp sema 
to emit a proper error message. There's a "are we in CTFE" flag 
in DMD `Scope`.


More information about the Digitalmars-d mailing list