mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
fix build
This commit is contained in:
parent
ed8bb5d63a
commit
dfcd851dba
1 changed files with 4 additions and 4 deletions
|
|
@ -424,7 +424,7 @@ constexpr auto n() noexcept {
|
||||||
constexpr auto name = name_ptr ? str_view{name_ptr, std::char_traits<char>::length(name_ptr)} : str_view{};
|
constexpr auto name = name_ptr ? str_view{name_ptr, std::char_traits<char>::length(name_ptr)} : str_view{};
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
str_view name;
|
str_view name;
|
||||||
if (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
if constexpr (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
||||||
static_assert(always_false_v<E>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
static_assert(always_false_v<E>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
||||||
return str_view{};
|
return str_view{};
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -433,7 +433,7 @@ constexpr auto n() noexcept {
|
||||||
}
|
}
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
auto name = str_view{__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 1};
|
auto name = str_view{__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 1};
|
||||||
if (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
if constexpr (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
||||||
static_assert(always_false_v<E>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
static_assert(always_false_v<E>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
||||||
return str_view{};
|
return str_view{};
|
||||||
} else if (name.str_[name.size_ - 1] == ']') {
|
} else if (name.str_[name.size_ - 1] == ']') {
|
||||||
|
|
@ -500,7 +500,7 @@ constexpr auto n() noexcept {
|
||||||
auto name = name_ptr ? str_view{name_ptr, std::char_traits<char>::length(name_ptr)} : str_view{};
|
auto name = name_ptr ? str_view{name_ptr, std::char_traits<char>::length(name_ptr)} : str_view{};
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
str_view name;
|
str_view name;
|
||||||
if (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
if constexpr (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
||||||
static_assert(always_false_v<decltype(V)>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
static_assert(always_false_v<decltype(V)>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
||||||
return str_view{};
|
return str_view{};
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -516,7 +516,7 @@ constexpr auto n() noexcept {
|
||||||
}
|
}
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
auto name = str_view{__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 1};
|
auto name = str_view{__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 1};
|
||||||
if (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
if constexpr (sizeof(__PRETTY_FUNCTION__) == sizeof(__FUNCTION__)) {
|
||||||
static_assert(always_false_v<decltype(V)>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
static_assert(always_false_v<decltype(V)>, "magic_enum::detail::n requires __PRETTY_FUNCTION__.");
|
||||||
return str_view{};
|
return str_view{};
|
||||||
} else if (name.str_[name.size_ - 1] == ']') {
|
} else if (name.str_[name.size_ - 1] == ']') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue