TypeId.h
Go to the documentation of this file.
1 #ifndef _utl_TypeId_h_
2 #define _utl_TypeId_h_
3 
4 #include <typeinfo>
5 #include <string>
6 
7 
8 namespace utl {
9 
27  namespace TypeId {
28 
29  std::string Demangle(const std::string& mangledName);
30 
31 
32  template<typename T>
33  inline
34  std::string
35  Name()
36  {
37  return Demangle(typeid(T).name());
38  }
39 
40 
41  template<typename T>
42  inline
43  std::string
45  {
46  return typeid(T).name();
47  }
48 
49  }
50 
51 }
52 
53 
54 #endif
string Demangle(const string &mangledName)
Definition: TypeId.cc:16
std::string Name()
Definition: TypeId.h:35
std::string MangledName()
Definition: TypeId.h:44

, generated on Tue Sep 26 2023.