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

Boost has a special utility macro called BOOST_CURRENT_FUNCTION that hides the differences between the compiler implementations.

Following it’s implementation we see that there are several macros depending on compiler:

  • __PRETTY_FUNCTION__ — GCC, MetroWerks, Digital Mars, ICC, MinGW
  • __FUNCSIG__ — MSVC
  • __FUNCTION__ — Intel and IBM
  • __FUNC__ — Borland
  • __func__ — ANSI C99

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)