I work with g++ 4.8.1 and use these two macros for debugging. However, the __func__
macro gives me only the function name, which might be misleading in the case you have many functions with the same name in different classes. The __PRETTY_FUNCTION__
macro produces the whole function signature - with return type, class name and all arguments, which can be very long.
I'd like to have something between - a macro, which will give me only class name and function name. Any way to achieve that?
See Question&Answers more detail:os