From 300034b6a2965dd1f9855e1d1597d3e95c9782b2 Mon Sep 17 00:00:00 2001 From: terik23 Date: Fri, 26 Apr 2019 10:59:21 +0500 Subject: [PATCH] fix enable_if --- include/nameof.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.");