diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index e3b7729..09669a0 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -274,7 +274,7 @@ struct underlying_type : std::underlying_type {}; } // namespace magic_enum::detail // Checks is magic_enum supported compiler. -inline constexpr auto is_magic_enum_supported = detail::magic_enum_supported::value; +inline constexpr bool is_magic_enum_supported = detail::magic_enum_supported::value; // Checks whether T is an Unscoped enumeration type. // Provides the member constant value which is equal to true, if T is an [Unscoped enumeration](https://en.cppreference.com/w/cpp/language/enum#Unscoped_enumeration) type. Otherwise, value is equal to false. diff --git a/test/test.cpp b/test/test.cpp index f556090..359767b 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -49,6 +49,8 @@ struct enum_range { using namespace magic_enum; +static_assert(is_magic_enum_supported, "magic_enum: Unsupported compiler (https://github.com/Neargye/magic_enum#compiler-compatibility)."); + TEST_CASE("enum_cast") { SECTION("string") { #if defined(_MSC_VER) && _MSC_VER < 1920