What version of GCC (and its corresponding libstdc ++) are you using?
With GCC 4.8, I have
static inline std::string demangled_type_info_name(const std::type_info&ti) { int status = 0; return abi::__cxa_demangle(ti.name(),0,0,&status); }
and then i can use
std::cout << demangled_type_info_name(typeid(*ptr)) << std::endl;
where ptr points to some object with RTTI (i.e. with some virtual methods, especially with a virtual destructor).
source share