30 std::regex regexp(exp, std::regex::egrep);
31 while(std::regex_match(input, regexp)) {
32 std::string newstring = std::regex_replace(input, regexp, format);
33 input.swap(newstring);
40 char const*
const delimiters =
"<>";
42 while ((index = demangledName.find(toRemove)) != std::string::npos) {
45 while ((inx = demangledName.find_first_of(delimiters, inx)) != std::string::npos) {
46 if (demangledName[inx] ==
'<') {
51 demangledName.erase(index, inx + 1 - index);
52 if (demangledName[index] ==
' ' && (index == 0 || demangledName[index - 1] !=
'>')) {
53 demangledName.erase(index, 1);
68 while ((index = demangledName.find(toBeMoved)) != std::string::npos) {
69 demangledName.erase(index, asize);
72 char const c = demangledName[inx];
75 }
else if (depth > 0) {
76 if (c ==
'<') --
depth;
77 }
else if (c ==
'<' || c ==
',') {
78 demangledName.insert(inx + 1,
"const ");
92 while((pos = demangledName.find(from, pos)) != std::string::npos) {
93 demangledName.replace(pos, length, to);
100 size_t*
const nullSize = 0;
101 char*
const null = 0;
104 char* demangled = abi::__cxa_demangle(mangledName, null, nullSize, &status);
106 throw cms::Exception(
"Demangling error") <<
" '" << mangledName <<
"'\n";
118 removeParameter(demangledName, allocator);
121 removeParameter(demangledName, comparator);
123 constBeforeIdentifier(demangledName);
127 reformatter(demangledName,
"(.*[<,][0-9]+)[ul]l*([,>].*)",
"$1$2");
129 replaceString(demangledName,
"unsigned long long",
"ULong64_t");
void replaceString(std::string &demangledName, std::string const &from, std::string const &to)
static std::string const input
std::string demangledName(const std::type_info &typeInfo)
std::string typeDemangle(char const *mangledName)