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> -
__Jock
- ANSI C 99
__FUNC___
- Borland
Comments
Post a Comment