1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00
This commit is contained in:
terik23 2019-07-27 17:52:29 +05:00
parent 34c86eaf11
commit c3f158324a

View file

@ -151,7 +151,7 @@ template <typename E>
static_assert(std::is_enum_v<E>, "magic_enum::detail::name_impl requires enum type.");
constexpr auto strings = strings_v<E>;
if (auto i = static_cast<std::size_t>((static_cast<int>(value) - min_v<E>)); i < strings.size()) {
if (auto i = static_cast<std::size_t>(static_cast<int>(value) - min_v<E>); i < strings.size()) {
return strings[i];
}