43#if defined(__clang__) || defined(__GNUC__)
49#if LLVM_GET_TYPE_NAME_STATIC_ASSERT
50 static_assert(KeyPos != std::string_view::npos,
51 "Unable to find the template parameter!");
53 assert(KeyPos != std::string_view::npos &&
54 "Unable to find the template parameter!");
61 TemplateParamsStart.substr(
Key.size());
63#if LLVM_GET_TYPE_NAME_STATIC_ASSERT
65 static_assert(!SubstitutionKey.empty() && SubstitutionKey.back() ==
']',
66 "Name doesn't end in the substitution key!");
68 assert(!SubstitutionKey.empty() && SubstitutionKey.back() ==
']' &&
69 "Name doesn't end in the substitution key!");
72 return SubstitutionKey.substr(0, SubstitutionKey.size() - 1);
73#elif defined(_MSC_VER)
79#if LLVM_GET_TYPE_NAME_STATIC_ASSERT
80 static_assert(KeyPos != std::string_view::npos,
81 "Unable to find the template parameter!");
83 assert(KeyPos != std::string_view::npos &&
84 "Unable to find the template parameter!");
91 GetTypeNameStart.substr(
Key.size());
95 SubstitutionKey.find(
"class ") == 0
96 ? SubstitutionKey.substr(
sizeof(
"class ") - 1)
99 RmPrefixClass.find(
"struct ") == 0
100 ? RmPrefixClass.substr(
sizeof(
"struct ") - 1)
103 RmPrefixStruct.find(
"union ") == 0
104 ? RmPrefixStruct.substr(
sizeof(
"union ") - 1)
107 RmPrefixUnion.find(
"enum ") == 0
108 ? RmPrefixUnion.substr(
sizeof(
"enum ") - 1)
112#if LLVM_GET_TYPE_NAME_STATIC_ASSERT
113 static_assert(AnglePos != std::string_view::npos,
114 "Unable to find the closing '>'!");
116 assert(AnglePos != std::string_view::npos &&
117 "Unable to find the closing '>'!");
120 return RmPrefixEnum.substr(0, AnglePos);
124 return "UNKNOWN_TYPE";