diff --git a/include/nameof.hpp b/include/nameof.hpp index 86a6055..e400481 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -188,7 +188,7 @@ template } template -struct nameof_enum_t final { +struct nameof_enum_impl_t final { [[nodiscard]] constexpr std::string_view operator()(int value) const noexcept { if constexpr (V > std::numeric_limits>::max()) { return {"nameof_enum::out_of_range"}; @@ -212,13 +212,13 @@ struct nameof_enum_t final { case 7: return nameof_enum_impl(V + 7)>(); default: - return nameof_enum_t{}(value); + return nameof_enum_impl_t{}(value); } } }; template -struct nameof_enum_t final { +struct nameof_enum_impl_t final { [[nodiscard]] constexpr std::string_view operator()(int) const noexcept { return {"nameof_enum::out_of_range"}; } @@ -240,7 +240,7 @@ template [[nodiscard]] constexpr std::string_view nameof_enum(T value) noexcept { constexpr bool s = std::is_signed_v>>; constexpr int min = s ? -NAMEOF_ENUM_MAX_SEARCH_DEPTH : 0; - return detail::nameof_enum_t, min>{}(static_cast(value)); + return detail::nameof_enum_impl_t, min>{}(static_cast(value)); } // nameof_enum used to obtain the simple (unqualified) string enum name of static storage enum variable.