mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
add missing static_assert
This commit is contained in:
parent
963ee65e95
commit
97e6f35c46
1 changed files with 2 additions and 0 deletions
|
|
@ -222,6 +222,8 @@ inline constexpr auto name_v = n<E, V>();
|
|||
|
||||
template <typename E, auto V>
|
||||
constexpr bool is_valid() noexcept {
|
||||
static_assert(is_enum_v<E>, "magic_enum::detail::is_valid requires enum type.");
|
||||
|
||||
return n<E, static_cast<E>(V)>().size() != 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue