3 #ifndef DUNE_CLASSNAME_HH 4 #define DUNE_CLASSNAME_HH 17 #endif // #if HAVE_CXA_DEMANGLE 25 typedef typename std::remove_reference<T>::type TR;
26 std::string
className =
typeid( TR ).name();
29 char *demangled = abi::__cxa_demangle( className.c_str(), 0, 0, &status );
32 className = demangled;
33 std::free( demangled );
35 #endif // #if HAVE_CXA_DEMANGLE 36 if (std::is_const<TR>::value)
37 className +=
" const";
38 if (std::is_volatile<TR>::value)
39 className +=
" volatile";
40 if (std::is_lvalue_reference<T>::value)
42 else if (std::is_rvalue_reference<T>::value)
51 return className<T>();
55 #endif // DUNE_CLASSNAME_HH Dune namespace.
Definition: alignment.hh:10
std::string className()
Provide the demangled class name of a type T as a string.
Definition: classname.hh:23