Go to the documentation of this file.00001
00002
00003
00004 #ifndef UTILMM_DEMANGLE_DEMANGLE_HEADER
00005 # define UTILMM_DEMANGLE_DEMANGLE_HEADER
00006
00007 # include <string>
00008 # include <typeinfo>
00009
00010 namespace utilmm {
00011
00027 std::string demangle(char const *name);
00028
00040 inline std::string demangle(std::string const &name) {
00041 return demangle(name.c_str());
00042 }
00043
00055 inline std::string demangle(std::type_info const &type) {
00056 return demangle(type.name());
00057 }
00058
00070 template<typename Ty>
00071 std::string real_name_of() {
00072 return demangle(typeid(Ty));
00073 }
00074
00075 }
00076
00077 #endif // UTILMM_DEMANGLE_DEMANGLE_HEADER