forcing compile time function execution

Artur Skawina art.08.09 at gmail.com
Tue Dec 27 09:59:55 PST 2011


Is there a way to *force* CTFE? Without using an extra wrapper like this:

auto f_impl(alias a)() { / * ... ctfeable ... */ }
auto f(alias a)() { enum ctfed = f_impl!a; return ctfed; }

A "@compile" (or "@ctfe" etc) function attribute would eliminate the need for the wrapper...

artur


More information about the Digitalmars-d mailing list