Is there an idiom, preferably D1, to detect whether or not the code is 
currently executing as a ctfe?

Ie:

void foo()
{
    (static?) if( ???? )
    {
        // Run-time code here
        // that does stuff the CTFE engine chokes on
    }
    else
    {
        // CTFE code here
        // that might not be ideal, but at least works as CTFE
    }
}


Reply via email to