What std functions are CTFE?

monarch_dodra monarchdodra at gmail.com
Mon Aug 19 05:18:23 PDT 2013


On Monday, 19 August 2013 at 11:34:48 UTC, bearophile wrote:
> Borislav Kosharov:
>
>> How do I know which functions are CTFE?
>
> While Don improve CTFE, the number of CTFE-able functions 
> increases.

What bearophile said. The amount of functions that can be CTFE'd 
is increasing everyday.

It *would* though be nice to document it as such (eg $(CTFEable) 
).

That said, it is also kind of like @safe and nothrow: For 
templates, it'll really depend on the arguments: For example, 
Appender!(char*) can be CTFE'd, but chances are it won't work for 
a struct with postblit.

But yes, I think we need to document better.


More information about the Digitalmars-d-learn mailing list