diff --git a/doc/reference.md b/doc/reference.md index 518959f..7f59a5a 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -21,8 +21,10 @@ * All functions `constexpr` and `noexcept`. * To check is nameof_type supported compiler use macro `NAMEOF_TYPE_SUPPORTED` or constexpr constant `nameof::is_nameof_type_supported`. +If nameof_type used on unsupported compiler, occurs the compilation error. To suppress error define macro `NAMEOF_TYPE_NO_CHECK_SUPPORT`. * To check is nameof_enum supported compiler use macro `NAMEOF_ENUM_SUPPORTED` or constexpr constant `nameof::is_nameof_enum_supported`. +If nameof_enum used on unsupported compiler, occurs the compilation error. To suppress error define macro `NAMEOF_ENUM_NO_CHECK_SUPPORT`. ## `NAMEOF` diff --git a/include/nameof.hpp b/include/nameof.hpp index 6c2d07e..a7a131b 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -212,7 +212,7 @@ struct identity final { template struct nameof_type_supported final -#if defined(NAMEOF_TYPE_SUPPORTED) && NAMEOF_TYPE_SUPPORTED +#if defined(NAMEOF_TYPE_SUPPORTED) && NAMEOF_TYPE_SUPPORTED || defined(NAMEOF_TYPE_NO_CHECK_SUPPORT) : std::true_type {}; #else : std::false_type {}; @@ -220,7 +220,7 @@ struct nameof_type_supported final template struct nameof_enum_supported final -#if defined(NAMEOF_ENUM_SUPPORTED) && NAMEOF_ENUM_SUPPORTED +#if defined(NAMEOF_ENUM_SUPPORTED) && NAMEOF_ENUM_SUPPORTED || defined(NAMEOF_ENUM_NO_CHECK_SUPPORT) : std::true_type {}; #else : std::false_type {};