On Friday, 7 December 2018 at 02:37:34 UTC, Arun Chandrasekaran wrote:
I'm trying to get the current function name and apparently the commented line errors out.

What am I doing wrong?



void main()
    import std.experimental.all;
    void foo() {
// __traits(identifier, mixin(__FUNCTION__)).writeln; // compilation error
    __traits(identifier, mixin(__FUNCTION__)).writeln;

Looks like this will do the trick https://run.dlang.io/is/cX3S37

Reply via email to