Is there a compile-time constant like __FUNCTION__ or __func__ that includes for class methods also the class name?
For example for a method named foo in class Bar it should not expand to foo but to Bar::foo.
Yes, with GCC or Clang you can use the non-standard extension __PRETTY_FUNCTION__
which gives the full signature e.g. void Bar::foo(int)
See http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With