diff --git a/include/nameof.hpp b/include/nameof.hpp index 5895adf..327787d 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -85,7 +85,7 @@ struct identity final { template struct nameof_type_supported final -#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) +#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) || defined(NAMEOF_TYPE_NO_CHECK_SUPPORT) : std::true_type {}; #else : std::false_type {}; @@ -93,7 +93,7 @@ struct nameof_type_supported final template struct nameof_enum_supported final -#if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 || defined(_MSC_VER) +#if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 || defined(_MSC_VER) || defined(NAMEOF_ENUM_NO_CHECK_SUPPORT) : std::true_type {}; #else : std::false_type {}; @@ -307,6 +307,7 @@ template template [[nodiscard]] constexpr std::string_view nameof_type() noexcept { static_assert(detail::nameof_type_supported::value, "nameof::nameof_type: Unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); + return detail::nameof_type_v>; } @@ -314,6 +315,7 @@ template template [[nodiscard]] constexpr std::string_view nameof_full_type() noexcept { static_assert(detail::nameof_type_supported::value, "nameof::nameof_type: Unsupported compiler (https://github.com/Neargye/nameof#compiler-compatibility)."); + return detail::nameof_type_v; }