MUQ  0.4.3
Demangler.cpp
Go to the documentation of this file.
2 
3 #include <cxxabi.h>
4 #include <memory>
5 
6 std::string muq::Utilities::demangle(const char* name) {
7 
8  int status;
9 
10  std::unique_ptr<char, void(*)(void*)> res {
11  abi::__cxa_demangle(name, NULL, NULL, &status),
12  std::free
13  };
14 
15  // If the demangling was successful, return the demangled name as a string
16  return (status==0) ? res.get() : name ;
17 }
std::string demangle(const char *name)
Definition: Demangler.cpp:6