diff --git a/include/nameof.hpp b/include/nameof.hpp index 82ce6f5..e4887de 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -56,7 +56,7 @@ #endif // Checks nameof_enum compiler compatibility. -#if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 || defined(_MSC_VER) +#if defined(__clang__) || defined(__GNUC__) && __GNUC__ >= 9 || defined(_MSC_VER) # undef NAMEOF_ENUM_SUPPORTED # define NAMEOF_ENUM_SUPPORTED 1 #endif @@ -367,7 +367,7 @@ template constexpr auto n() noexcept { static_assert(is_enum_v, "nameof::detail::n requires enum type."); #if defined(NAMEOF_ENUM_SUPPORTED) && NAMEOF_ENUM_SUPPORTED -# if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 +# if defined(__clang__) || defined(__GNUC__) constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2}); # elif defined(_MSC_VER) constexpr auto name = pretty_name({__FUNCSIG__, sizeof(__FUNCSIG__) - 17});