Is there an alternative to "__FUNCTION__" that gives the actual function symbol and not the name as a string?

Adam D Ruppe destructionator at gmail.com
Sat Oct 23 20:00:29 UTC 2021


On Saturday, 23 October 2021 at 18:23:47 UTC, Simon wrote:
> For debugging purposes, I have built a mixin that will, when 
> declared inside a function, output code to the console that 
> will reproduce the exact function call.

Sounds like what you really want is

https://github.com/dlang/dmd/pull/13071

but the PR there is not merged :(

the other way though is the string mixin with the parent {} thing 
it is pretty ugly.


More information about the Digitalmars-d-learn mailing list