DASH  0.3.0
TypeInfo.h
1 #ifndef DASH__META__TYPE_INFO_H__INCLUDED
2 #define DASH__META__TYPE_INFO_H__INCLUDED
3 
4 #include <string>
5 #include <typeinfo>
6 
7 namespace dash {
8 
9 namespace internal {
10  std::string demangle(const char * typeid_name);
11 }
12 
19 template <class T>
20 std::string typestr(const T & obj) {
21  return dash::internal::demangle(
22  typeid(obj).name()
23  );
24 }
25 
32 template <class T>
33 std::string typestr() {
34  return dash::internal::demangle(
35  typeid(T).name()
36  );
37 }
38 
39 } // namespace dash
40 
41 #endif // DASH__META__TYPE_INFO_H__INCLUDED
This class is a simple memory pool which holds allocates elements of size ValueType.
Definition: AllOf.h:8
std::string typestr(const T &obj)
Returns string containing the type name of the given object.
Definition: TypeInfo.h:20