Developer Documentation

typename.hh
1 #pragma once
2
7
8 #include <string>
9 #include <typeinfo>
10
11 namespace OpenMesh {
12
13 template <typename T>
14 std::string get_type_name()
15 {
16 #ifdef _MSC_VER
17 // MSVC'S type_name returns only a friendly name with name() method,
18 // to get a unique name use raw_name() method instead
19 return typeid(T).raw_name();
20 #else
21 // GCC and clang curently return mangled name as name(), there is no raw_name() method
22 return typeid(T).name();
23 #endif
24 }
25
26 }
OpenMesh
Definition: MeshItems.hh:59