Commit 3c36954c authored by Dominik Charousset's avatar Dominik Charousset

Skip struct prefixes on MSVC

parent ac7b22ba
......@@ -74,6 +74,14 @@ constexpr string_view anon_ns[] = {
/// remainder. For example, "ns::foo::bar" prints "ns.foo" to `out` and returns
/// "bar".
string_view reduce_symbol(std::ostream& out, string_view symbol) {
auto skip = [&](string_view str) {
if (starts_with(symbol, str))
symbol.remove_prefix(str.size());
};
// MSVC adds `struct` to symbol names. For example:
// void __cdecl `anonymous-namespace'::foo::tpl<struct T>::run(void)
// ^~~~~~
skip("struct ");
string_view last = "";
bool printed = false;
// Prints the content of `last` and then replaces it with `x`.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment