Battle-plan for CTFE

Stefan Koch via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Aug 29 01:39:56 PDT 2016


On Monday, 29 August 2016 at 08:05:10 UTC, Rory McGuire wrote:
> On Mon, Aug 29, 2016 at 9:51 AM, Dominikus Dittes Scherkl via
>>
>> The work you are doing is just awesome!
>> Many thanks.
>>
>
> +1 your work is key for our success as a community.
>
> R

Thanks guys.

I just came up with a nifty little patch that makes it possible 
to ensure that a function is _only_ used at ctfe.
Or the opposite.

static assert(__ctfe, "This function is not supposed to be called 
outside of ctfe");
and static assert(!__ctfe, "This function is not supposed to be 
called during ctfe");

similarly you can use static if (__ctfe).

Is it worth trying to get it into master ?


More information about the Digitalmars-d-announce mailing list