41#if defined(__clang__) || defined(__GNUC__)
46 Name.substr(Name.find(
Key));
47#if LLVM_GET_TYPE_NAME_STATIC_ASSERT
48 static_assert(!TemplateParamsStart.empty(),
49 "Unable to find the template parameter!");
51 assert(!TemplateParamsStart.empty() &&
52 "Unable to find the template parameter!");
56 TemplateParamsStart.substr(
Key.size());
58#if LLVM_GET_TYPE_NAME_STATIC_ASSERT
60 static_assert(!SubstitutionKey.empty() && SubstitutionKey.back() ==
']',
61 "Name doesn't end in the substitution key!");
63 assert(!SubstitutionKey.empty() && SubstitutionKey.back() ==
']' &&
64 "Name doesn't end in the substitution key!");
67 return SubstitutionKey.substr(0, SubstitutionKey.size() - 1);
68#elif defined(_MSC_VER)
73 Name.substr(Name.find(
Key));
74 static_assert(!GetTypeNameStart.empty(),
75 "Unable to find the template parameter!");
77 GetTypeNameStart.substr(
Key.size());
81 SubstitutionKey.find(
"class ") == 0
82 ? SubstitutionKey.substr(
sizeof(
"class ") - 1)
85 RmPrefixClass.find(
"struct ") == 0
86 ? RmPrefixClass.substr(
sizeof(
"struct ") - 1)
89 RmPrefixStruct.find(
"union ") == 0
90 ? RmPrefixStruct.substr(
sizeof(
"union ") - 1)
93 RmPrefixUnion.find(
"enum ") == 0
94 ? RmPrefixUnion.substr(
sizeof(
"enum ") - 1)
98 static_assert(AnglePos != std::string_view::npos,
99 "Unable to find the closing '>'!");
100 return RmPrefixEnum.substr(0, AnglePos);
104 return "UNKNOWN_TYPE";