MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / demangle

Function demangle

src/api.cpp:128–144  ·  view source on GitHub ↗

[[Rcpp::register]]

Source from the content-addressed store, hash-verified

126
127// [[Rcpp::register]]
128std::string demangle(const std::string& name) {
129 #ifdef RCPP_HAS_DEMANGLING
130 std::string real_class;
131 int status =-1;
132 char *dem = 0;
133 dem = abi::__cxa_demangle(name.c_str(), 0, 0, &status);
134 if (status == 0) {
135 real_class = dem;
136 free(dem);
137 } else {
138 real_class = name;
139 }
140 return real_class;
141 #else
142 return name;
143 #endif
144}
145
146// NOTE: remains registered but this routine is now effectively unused by Rcpp;
147// we retain it for backwards compatibility with any existing packages which

Callers 3

demangler_oneFunction · 0.85
get_return_type_dispatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected