From 00bd8528ceca1906d8c73d54a77874a204aec46c Mon Sep 17 00:00:00 2001 From: neargye Date: Fri, 4 Oct 2019 13:58:08 +0500 Subject: [PATCH] update doc fix MAGIC_ENUM_NO_CHECK_SUPPORT --- doc/reference.md | 1 + include/magic_enum.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/reference.md b/doc/reference.md index 0cbd4ae..8fc1cf0 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -20,6 +20,7 @@ * Before use, read the [limitations](limitations.md) of functionality. * To check is magic_enum supported compiler use macro `MAGIC_ENUM_SUPPORTED` or constexpr constant `magic_enum::is_magic_enum_supported`. +If magic_enum used on unsupported compiler, occurs the compilation error. To suppress error define macro `MAGIC_ENUM_NO_CHECK_SUPPORT`. ## `enum_cast` ```cpp diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index 80fb3a3..daa3622 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -84,7 +84,7 @@ namespace detail { template struct supported final -#if defined(MAGIC_ENUM_SUPPORTED) && MAGIC_ENUM_SUPPORTED +#if defined(MAGIC_ENUM_SUPPORTED) && MAGIC_ENUM_SUPPORTED || defined(MAGIC_ENUM_NO_CHECK_SUPPORT) : std::true_type {}; #else : std::false_type {};