Hi I need to determine the mangled name of a function from within an c++ app itself.
Is there any equivalent to the __FUNCDNAME__
macro in g++ ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To get the demangled name use __PRETTY_FUNCTION__.
Better is to use:
#include <boost/current_function.hpp>
BOOST_CURRENT_FUNCTION
This gives the demangled name. I looked at cxxabi.h but there does not seem to be a mangle function. Do you really want the mangled name?