On Friday, 2 November 2012 at 17:55:33 UTC, Adam D. Ruppe wrote:
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!()));
}
[email protected](7): int(string[] args)
That was fast, thanks!
template __PRETTY_FUNCTION()
{
const char[] __PRETTY_FUNCTION = "__traits(identifier,
__traits(parent, {})) ~ " ~ __FUNCTION_SIGNATURE!();
}
--rt