mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-06 16:56:42 +08:00
Completed rename and combined former Enum.h/EnumInternal.h.
This commit is contained in:
parent
8d7021975c
commit
4035284a0a
@ -1,19 +0,0 @@
|
||||
/// @file Enum.h
|
||||
/// Enum type generator.
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EnumInternal.h"
|
||||
|
||||
|
||||
|
||||
// TODO Consider using a traits type instead of prefixing static members with an
|
||||
// underscore.
|
||||
|
||||
#define ENUM(EnumType, UnderlyingType, ...) \
|
||||
_ENUM_TAG_DECLARATION(EnumType); \
|
||||
_ENUM_ARRAYS(EnumType, UnderlyingType, _ENUM_TAG(EnumType), __VA_ARGS__); \
|
||||
using EnumType = _enum::_Enum<_enum::_ENUM_TAG(EnumType)>; \
|
||||
_ENUM_STATIC_DEFINITIONS(EnumType, _ENUM_TAG(EnumType));
|
||||
8
enum.h
8
enum.h
@ -37,7 +37,7 @@
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
|
||||
#include "EnumPreprocessorMap.h"
|
||||
#include "enum_preprocessor_map.h"
|
||||
|
||||
|
||||
|
||||
@ -717,3 +717,9 @@ class _Enum : public _GeneratedArrays<Tag> {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define ENUM(EnumType, UnderlyingType, ...) \
|
||||
_ENUM_TAG_DECLARATION(EnumType); \
|
||||
_ENUM_ARRAYS(EnumType, UnderlyingType, _ENUM_TAG(EnumType), __VA_ARGS__); \
|
||||
using EnumType = _enum::_Enum<_enum::_ENUM_TAG(EnumType)>; \
|
||||
_ENUM_STATIC_DEFINITIONS(EnumType, _ENUM_TAG(EnumType));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user