Request for Comment assert(__ctfe)

Johannes Pfau nospam at example.com
Tue Apr 7 17:27:11 UTC 2020


Am Sun, 05 Apr 2020 16:00:42 +0000 schrieb Jonathan Marler:

> 
> So I say yes, I'd be fine with this "hack" to temporarily provide a path
> for programs to create CTFE-ONLY functions that won't go to code
> generation.  It's better than the status-quo and can be removed if we
> ever solve the general case.

The compiler can really not know if a function is supposed to be callable 
at runtime, see https://forum.dlang.org/post/
r6hotc$28au$2 at digitalmars.com for details. It could probably work if we 
decide to introduce 'export', but there was no consensus on that for 
years.

-- 
Johannes


More information about the Digitalmars-d mailing list