From 121166d26347253c53c7e668711395a04095e19d Mon Sep 17 00:00:00 2001 From: neargye Date: Sat, 23 May 2020 18:06:12 +0500 Subject: [PATCH] fix decay --- include/nameof.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nameof.hpp b/include/nameof.hpp index bbf4e1d..f2dfd0b 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -553,10 +553,10 @@ template using namespace detail::enums; using D = detail::remove_cvref_t; using U = std::underlying_type_t; - static_assert(detail::nameof_enum_supported::value, "nameof::nameof_enum unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); + static_assert(detail::nameof_enum_supported::value, "nameof::nameof_enum unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); static_assert(count_v > 0, "nameof::nameof_enum requires enum implementation and valid max and min."); - if (const auto i = static_cast(value) - min_v; static_cast(value) >= static_cast(min_v) && static_cast(value) <= static_cast(max_v)) { + if (const auto i = static_cast(value) - min_v; static_cast(value) >= static_cast(min_v) && static_cast(value) <= static_cast(max_v)) { if constexpr (sparsity_v) { if (const auto idx = indexes_v[i]; idx != invalid_index_v) { return strings_v[idx];