mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
fix enum name in namespace
This commit is contained in:
parent
6fec6f6386
commit
6fe7ffbf35
2 changed files with 70 additions and 4 deletions
|
|
@ -501,13 +501,16 @@ constexpr auto n() noexcept {
|
|||
name.size_ -= (prefix + 2);
|
||||
name.str_ += (prefix + 2);
|
||||
}
|
||||
std::size_t p = 0;
|
||||
for (std::size_t i = 0; i < name.size_; ++i) {
|
||||
if (name.str_[i] == ':') {
|
||||
name.size_ -= (i + 2);
|
||||
name.str_ += (i + 2);
|
||||
break;
|
||||
p = i + 1;
|
||||
}
|
||||
}
|
||||
if (p > 0) {
|
||||
name.size_ -= p;
|
||||
name.str_ += p;
|
||||
}
|
||||
return name;
|
||||
} else {
|
||||
return str_view{}; // Unsupported compiler or Invalid customize.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue