By changing this to a standard function:

const(char[]) __FUNCTION() @property
{
   return "__traits(identifier, __traits(parent, {}))";
}


... the calling syntax is slightly easier on the eye:

void main()
{
    writefln( "File: %s, Func: %s, Line: %d", __FILE__,
mixin(__FUNCTION), __LINE__ );

    //throw new Exception( "Error: Function " ~ mixin(__FUNCTION) );
}

That is, mixin(__FUNCTION) instead of mixin(__FUNCTION!())


Is there any downside to this?

Reply via email to