function name inside a funciton

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Apr 11 23:44:28 PDT 2014


On 4/12/14, user <user at user.com> wrote:
> Never mind, just discovered __PRETTY_FUNCTION__.

Yes and there's also __FUNCTION__.

Philippe Sigaud's book[1] had a nice trick of extracting the current
function name with a single template instantiation, but I can't find
it in his template book. There's a "Local Scope Name" chapter, but I
distinctly remember something which was a single template call.. hmm..
it might have changed in recent versions.

[1] : https://github.com/PhilippeSigaud/D-templates-tutorial


More information about the Digitalmars-d-learn mailing list