add NAMEOF_ENUM_NO_CHECK_SUPPORT and NAMEOF_TYPE_NO_CHECK_SUPPORT

This commit is contained in:
neargye 2019-10-04 13:57:06 +05:00
parent f7ed4583d8
commit d7f6787cd1
2 changed files with 4 additions and 2 deletions

View file

@ -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`

View file

@ -212,7 +212,7 @@ struct identity final {
template <typename... T>
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 <typename T>
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 {};