| 165 | |
| 166 | #if FMT_USE_RTTI |
| 167 | inline auto normalize_libcxx_inline_namespaces(string_view demangled_name_view, |
| 168 | char* begin) -> string_view { |
| 169 | // Normalization of stdlib inline namespace names. |
| 170 | // libc++ inline namespaces. |
| 171 | // std::__1::* -> std::* |
| 172 | // std::__1::__fs::* -> std::* |
| 173 | // libstdc++ inline namespaces. |
| 174 | // std::__cxx11::* -> std::* |
| 175 | // std::filesystem::__cxx11::* -> std::filesystem::* |
| 176 | if (demangled_name_view.starts_with("std::")) { |
| 177 | char* to = begin + 5; // std:: |
| 178 | for (const char *from = to, *end = begin + demangled_name_view.size(); |
| 179 | from < end;) { |
| 180 | // This is safe, because demangled_name is NUL-terminated. |
| 181 | if (from[0] == '_' && from[1] == '_') { |
| 182 | const char* next = from + 1; |
| 183 | while (next < end && *next != ':') next++; |
| 184 | if (next[0] == ':' && next[1] == ':') { |
| 185 | from = next + 2; |
| 186 | continue; |
| 187 | } |
| 188 | } |
| 189 | *to++ = *from++; |
| 190 | } |
| 191 | demangled_name_view = {begin, detail::to_unsigned(to - begin)}; |
| 192 | } |
| 193 | return demangled_name_view; |
| 194 | } |
| 195 | |
| 196 | template <class OutputIt> |
| 197 | auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out) |
no test coverage detected