mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
fix flag::enum_value
This commit is contained in:
parent
103cc617ba
commit
e500ae7f00
1 changed files with 2 additions and 2 deletions
|
|
@ -932,8 +932,8 @@ template <typename E>
|
|||
template <typename E, std::size_t I>
|
||||
[[nodiscard]] constexpr auto enum_value() noexcept -> detail::enable_if_enum_t<E, std::decay_t<E>> {
|
||||
using D = std::decay_t<E>;
|
||||
static_assert(detail::count_v<D> > 0, "magic_enum::flags requires enum implementation and valid max and min.");
|
||||
static_assert(I < detail::count_v<D>, "magic_enum::flags::enum_value out of range.");
|
||||
static_assert(detail::count_v<D, true> > 0, "magic_enum::flags requires enum implementation and valid max and min.");
|
||||
static_assert(I < detail::count_v<D, true>, "magic_enum::flags::enum_value out of range.");
|
||||
|
||||
return detail::values_v<D, true>[I];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue