On Friday, 2 November 2012 at 17:31:55 UTC, Rob T wrote:
Thanks to input from the D community, I've managed to implement a reasonable way to log the name of a calling function.

Huh, that's pretty brilliant!


The ONLY thing left that I would like to have, is ability to display the function signature along with the name.

template __FUNCTION_SIGNATURE() { const char[] __FUNCTION_SIGNATURE = "typeof(__traits(parent, {})).stringof"; }

int main(string[] args) {
        assert(0, mixin(__FUNCTION_SIGNATURE!()));
}

core.exception.AssertError@test4.d(7): int(string[] args)


Reply via email to