alpaqa
1.0.0a8
Nonconvex constrained optimization
Loading...
Searching...
No Matches
alpaqa
src
util
demangled-typename.cpp
Go to the documentation of this file.
1
#include <
alpaqa/util/demangled-typename.hpp
>
2
#include <memory>
3
#ifdef __GNUC__
4
#include <cxxabi.h>
5
#endif
6
7
std::string
demangled_typename
(
const
std::type_info &t) {
8
#ifdef __GNUC__
9
return
std::unique_ptr<char,
decltype
(&std::free)>{
10
abi::__cxa_demangle(t.name(),
nullptr
,
nullptr
,
nullptr
), std::free}
11
.get();
12
#else
13
return
t.name();
14
#endif
15
}
demangled_typename
std::string demangled_typename(const std::type_info &t)
Get the pretty name of the given type as a string.
Definition:
demangled-typename.cpp:7
demangled-typename.hpp
Generated by
1.9.6