fix checks

This commit is contained in:
neargye 2021-04-03 00:37:30 +03:00
parent bb413bbdaa
commit 84c6c9866a

View file

@ -95,7 +95,7 @@
#endif #endif
// Checks nameof_member compiler compatibility. // Checks nameof_member compiler compatibility.
#if (defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 7) && !defined(_MSC_VER) #if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 7
# undef NAMEOF_MEMBER_SUPPORTED # undef NAMEOF_MEMBER_SUPPORTED
# define NAMEOF_MEMBER_SUPPORTED 1 # define NAMEOF_MEMBER_SUPPORTED 1
#endif #endif
@ -855,7 +855,7 @@ constexpr auto n() noexcept {
if constexpr (custom_name.empty()) { if constexpr (custom_name.empty()) {
static_cast<void>(custom_name); static_cast<void>(custom_name);
#if defined(NAMEOF_TYPE_SUPPORTED) && NAMEOF_TYPE_SUPPORTED #if defined(NAMEOF_MEMBER_SUPPORTED) && NAMEOF_MEMBER_SUPPORTED
constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2}); constexpr auto name = pretty_name({__PRETTY_FUNCTION__, sizeof(__PRETTY_FUNCTION__) - 2});
return cstring<name.size()>{name}; return cstring<name.size()>{name};