1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

fix build clang trunk

This commit is contained in:
neargye 2022-08-09 16:44:58 +04:00
parent 51d20f4d18
commit e0f8f14724

View file

@ -461,8 +461,8 @@ constexpr bool is_valid() noexcept {
[[maybe_unused]] constexpr auto custom = customize::enum_name<E>(v);
static_assert(std::is_same_v<std::decay_t<decltype(custom)>, customize::customize_t>, "magic_enum::customize requires customize_t type.");
if constexpr (std::is_same_v<std::decay_t<decltype(custom)>, customize::customize_t> && custom.index() == 0) {
static_assert(!name.empty(), "magic_enum::customize requires not empty string.");
constexpr auto name = std::get<string_view>(custom);
static_assert(!name.empty(), "magic_enum::customize requires not empty string.");
return name.size() != 0;
} else {
return n<E, v>().size() != 0;