We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bc44256 + 84f8cbf commit 0f3c0c2Copy full SHA for 0f3c0c2
iguana/enum_reflection.hpp
@@ -35,11 +35,14 @@ inline constexpr std::string_view type_string() {
35
constexpr std::string_view str = get_raw_name<T>();
36
constexpr auto next1 = str.rfind(sample[pos + 3]);
37
#if defined(_MSC_VER)
38
- constexpr auto s1 = str.substr(pos + 6, next1 - pos - 6);
+ constexpr std::size_t npos = str.find_first_of(" ", pos);
39
+ if (npos != std::string_view::npos)
40
+ return str.substr(npos + 1, next1 - npos - 1);
41
+ else
42
+ return str.substr(pos, next1 - pos);
43
#else
- constexpr auto s1 = str.substr(pos, next1 - pos);
44
45
#endif
- return s1;
46
}
47
48
template <auto T>
0 commit comments