Go to the documentation of this file.
3#ifndef DUNE_CLASSNAME_HH
4#define DUNE_CLASSNAME_HH
17#if __has_include(<cxxabi.h>) && !DISABLE_CXA_DEMANGLE
18#define HAVE_CXA_DEMANGLE 1
26 inline std::string demangle(std::string name)
30 std::unique_ptr<char, void(*)(
void*)>
31 demangled(abi::__cxa_demangle(name.c_str(),
nullptr,
nullptr, &status),
34 name = demangled.get();
47 typedef typename std::remove_reference<T>::type TR;
48 std::string
className = Impl::demangle(
typeid( TR ).name() );
49 if (std::is_const<TR>::value)
51 if (std::is_volatile<TR>::value)
53 if (std::is_lvalue_reference<T>::value)
55 else if (std::is_rvalue_reference<T>::value)
67 typedef typename std::remove_reference<T>::type TR;
68 std::string
className = Impl::demangle(
typeid(v).name() );
69 if (std::is_const<TR>::value)
71 if (std::is_volatile<TR>::value)
Dune namespace.
Definition: alignedallocator.hh:11
std::string className()
Provide the demangled class name of a type T as a string.
Definition: classname.hh:45