diff --git a/include/magic_enum/magic_enum.hpp b/include/magic_enum/magic_enum.hpp index e132409ec..62599a12c 100644 --- a/include/magic_enum/magic_enum.hpp +++ b/include/magic_enum/magic_enum.hpp @@ -1258,7 +1258,8 @@ template // Returns underlying value from enum value. template -[[nodiscard]] constexpr auto enum_underlying(E value) noexcept -> -> underlying_type_t { +[[nodiscard]] constexpr auto enum_underlying(E value) noexcept -> underlying_type_t +{ return static_cast>(value); }