On 2016-08-29 10:39, Stefan Koch wrote:

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 ?

Wow, absolutely :)

--
/Jacob Carlborg

Reply via email to