1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

add MAGIC_ENUM_SUPPORTED_ALIASES

This commit is contained in:
neargye 2020-08-15 23:56:54 +05:00
parent 32e2e6318d
commit d73a985f52
3 changed files with 8 additions and 4 deletions

View file

@ -62,6 +62,12 @@
# define MAGIC_ENUM_SUPPORTED 1
#endif
// Checks magic_enum compiler aliases compatibility.
#if defined(__clang__) && __clang_major__ >= 5 || defined(__GNUC__) && __GNUC__ >= 9 || defined(_MSC_VER) && _MSC_VER >= 1920
# undef MAGIC_ENUM_SUPPORTED_ALIASES
# define MAGIC_ENUM_SUPPORTED_ALIASES 1
#endif
// Enum value must be greater or equals than MAGIC_ENUM_RANGE_MIN. By default MAGIC_ENUM_RANGE_MIN = -128.
// If need another min range for all enum types by default, redefine the macro MAGIC_ENUM_RANGE_MIN.
#if !defined(MAGIC_ENUM_RANGE_MIN)