mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
fix is_magic_enum_supported
This commit is contained in:
parent
a9a8892026
commit
c9337182f4
2 changed files with 3 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ struct underlying_type<T, true> : std::underlying_type<T> {};
|
|||
} // namespace magic_enum::detail
|
||||
|
||||
// Checks is magic_enum supported compiler.
|
||||
inline constexpr auto is_magic_enum_supported = detail::magic_enum_supported<void>::value;
|
||||
inline constexpr bool is_magic_enum_supported = detail::magic_enum_supported<void>::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.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ struct enum_range<number> {
|
|||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue