This commit is contained in:
Neargye 2020-01-31 14:08:22 +05:00
parent 1303731a6b
commit 9885d98bf3

View file

@ -367,7 +367,7 @@ template <typename E, E V>
constexpr auto n() noexcept { constexpr auto n() noexcept {
static_assert(is_enum_v<E>, "nameof::detail::n requires enum type."); static_assert(is_enum_v<E>, "nameof::detail::n requires enum type.");
#if defined(NAMEOF_ENUM_SUPPORTED) && NAMEOF_ENUM_SUPPORTED #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}); constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2});
# elif defined(_MSC_VER) # elif defined(_MSC_VER)
constexpr auto name = pretty_name({__FUNCSIG__, sizeof(__FUNCSIG__) - 17}); constexpr auto name = pretty_name({__FUNCSIG__, sizeof(__FUNCSIG__) - 17});