MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / demangle_typeid

Function demangle_typeid

imperative/python/src/helper.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace {
39
40std::string demangle_typeid(const char* name) {
41 int status = -4; // some arbitrary value to eliminate the compiler warning
42
43 // enable c++11 by passing the flag -std=c++11 to g++
44 std::unique_ptr<char, void (*)(void*)> res{
45 abi::__cxa_demangle(name, nullptr, nullptr, &status), std::free};
46
47 return (status == 0) ? res.get() : name;
48}
49} // namespace
50#else
51

Callers 1

typeid_nameFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected