c++ - Macro / keyword which can be used to print out method name? -


__ file __ and __ line __ well known CAD is a __ joke __ .

  #include & lt; Iostream & gt; Structure fu {zero} ({{std :: cout  

output

  main  

Is there a macro / keyword that output method name like Foo :: what ?

Boost has a special utility macro which hides the difference between the compiler implementation.

After implementing it, we see that there are several macros based on the compiler I:

  • __ PRETTY_FUNCTION___ - GCC, Metro Works
  • __Function___ - Intel and IBM
  • > li> __FUNC___ - Borland
  • __Jock - ANSI C 99

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -