diff --git a/include/nameof.hpp b/include/nameof.hpp index 0f15498..8822b4d 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -230,7 +230,7 @@ template constexpr auto min = enum_range::min > (std::numeric_limits::min)() ? enum_range::min : (std::numeric_limits::min)(); constexpr auto names = detail::enum_names_impl(std::make_integer_sequence{}); - if (auto i = static_cast((static_cast(value) - min)); i < names.size()) { + if (auto i = static_cast(static_cast(value) - min); i < names.size()) { return names[i]; }