gravatar
ladanyi@tmit.bme.hu
ladanyi@tmit.bme.hu
Improved LEMON_FUNCTION_NAME macro. It should work fine with GCC and the MS C++ compilers. Otherwise it reverts to using the __func__ variable which is C99, but I couldn't find a better alternative.
0 1 0
default
1 file changed with 7 insertions and 1 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -103,7 +103,13 @@
103 103
#endif
104 104

	
105 105
#ifndef LEMON_FUNCTION_NAME
106
#  define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
106
#  if defined __GNUC__
107
#    define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
108
#  elif defined _MSC_VER
109
#    define LEMON_FUNCTION_NAME (__FUNCSIG__)
110
#  else
111
#    define LEMON_FUNCTION_NAME (__func__)
112
#  endif
107 113
#endif
108 114

	
109 115
#ifdef DOXYGEN
0 comments (0 inline)