[Issue 5140] Add __FUNCTION__

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 11 10:04:49 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5140



--- Comment #15 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-11 10:04:38 PST ---
The pull now implements __FUNCTION__ and __PRETTY_FUNCTION__. You can take a
look at the test-case for examples, but in short:

1) __FUNCTION__ as a statement inside a function => fully-qualified name of the
current function
2) __FUNCTION__ as a default init for a parameter => fully-qualified name of
the calling function

3) __PRETTY_FUNCTION__ as a statement inside a function => same as #1 +
parameters, return type, and modifiers.

4) __PRETTY_FUNCTION__ as a default init for a parameter => same as #2 +
parameters, return type, and modifiers.

If either of these is called in module scope (e.g. enum which is initialized
with UFCS), it will return an empty string.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list