MUQ  0.4.3
Demangler.h
Go to the documentation of this file.
1 #ifndef DEMANGLER_H
2 #define DEMANGLER_H
3 
4 #include <string>
5 #include <typeinfo>
6 
7 namespace muq{
8 namespace Utilities{
9 
11  std::string demangle(const char* name);
12 
13 
14  template<typename PointerType>
15  std::string GetTypeName(PointerType const& ptr){
16  if(ptr.get()){
17  auto& r = *ptr.get();
18  return demangle(typeid(r).name());
19  }else{
20  return "";
21  }
22  }
23 
24 }
25 }
26 
27 
28 #endif
std::string GetTypeName(PointerType const &ptr)
Definition: Demangler.h:15
std::string demangle(const char *name)
Definition: Demangler.cpp:6