Rob T <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from Rob T <> 2012-09-27 00:06:22 PDT ---
I'd like to add that __FUNCTION__ should operate in a consistent manner to
__LINE__ and __FILE__ such that when used as a default value for a function
parameter, the value is set where the function is called, not where the
function is defined.

void Log( string funcname = __FUNCTION__)
  writeln( funcname );

void func1()
  Log(); // displays "func1"

void main()
  Log(); // displays "main"

To be more useful, the nested function names will have to prefixed with parent
level function names, and probably also module name as the highest level.

void main()
  void func2()
    Log(); // displays "main.func2"

Member functions of class and struc should be prefixed with the class and struc
names respectively.

For templates and overloaded functions, including the function signature would
help resolve which version of a function was called. It may be best to have a
separate version of __FUNCTION__ that displays the function signature, for
example, C++ has __PRETTY_FUNCTION__ which includes the function signature.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to