mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
add comment to MAGIC_ENUM_SUPPORTED
This commit is contained in:
parent
105c8f067e
commit
cbbb6dd8f1
1 changed files with 5 additions and 4 deletions
|
|
@ -42,6 +42,11 @@
|
|||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
// Checks magic_enum compiler compatibility.
|
||||
#if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 || defined(_MSC_VER)
|
||||
# define MAGIC_ENUM_SUPPORTED 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)
|
||||
|
|
@ -56,10 +61,6 @@
|
|||
|
||||
namespace magic_enum {
|
||||
|
||||
#if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 || defined(_MSC_VER)
|
||||
# define MAGIC_ENUM_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
// Enum value must be in range [MAGIC_ENUM_RANGE_MIN, MAGIC_ENUM_RANGE_MAX]. By default MAGIC_ENUM_RANGE_MIN = -128, MAGIC_ENUM_RANGE_MAX = 128.
|
||||
// If need another range for all enum types by default, redefine the macro MAGIC_ENUM_RANGE_MIN and MAGIC_ENUM_RANGE_MAX.
|
||||
// If need another range for specific enum type, add specialization enum_range for necessary enum type.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue