Go to the documentation of this file.
3#ifndef DUNE_CLASSNAME_HH
4#define DUNE_CLASSNAME_HH
25 inline std::string demangle(std::string name)
29 std::unique_ptr<char, void(*)(
void*)>
30 demangled(abi::__cxa_demangle(name.c_str(),
nullptr,
nullptr, &status),
33 name = demangled.get();
46 typedef typename std::remove_reference<T>::type TR;
47 std::string
className = Impl::demangle(
typeid( TR ).name() );
48 if (std::is_const<TR>::value)
50 if (std::is_volatile<TR>::value)
52 if (std::is_lvalue_reference<T>::value)
54 else if (std::is_rvalue_reference<T>::value)
66 typedef typename std::remove_reference<T>::type TR;
67 std::string
className = Impl::demangle(
typeid(v).name() );
68 if (std::is_const<TR>::value)
70 if (std::is_volatile<TR>::value)
Dune namespace.
Definition: alignedallocator.hh:14
std::string className()
Provide the demangled class name of a type T as a string.
Definition: classname.hh:44