diff --git a/include/nameof.hpp b/include/nameof.hpp index 4d27fd6..c86c426 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -223,8 +223,8 @@ template } // namespace nameof::detail // Obtains simple (unqualified) string enum name of enum variable. -template >>> -[[nodiscard]] constexpr std::string_view nameof_enum(E value) noexcept { +template +[[nodiscard]] constexpr std::enable_if_t>, std::string_view> nameof_enum(E value) noexcept { using D = std::decay_t; static_assert(std::is_enum_v, "nameof::nameof_enum requires enum type."); static_assert(enum_range::max > enum_range::min, "nameof::enum_range requires max > min.");