Feature: __FUNCTION__ to give name of parent function.

bearophile bearophileHUGS at lycos.com
Tue Dec 21 10:21:57 PST 2010


Iain Buclaw:

> someone wanting a way to have the parent function
> name outputted for logging purposes. Just like there is __LINE__ and __FILE__ for
> access to the line number and filename, would be handy (and trivial to implement)
> if there was a __FUNCTION__ variable also for outputting the bare name of the
> function.

I have seen this enhancement request many times. Time ago I have also suggested a reference to the function itself, to be used in self recursive functions.

Bye,
bearophile


More information about the Digitalmars-d mailing list